Even up WTF::String to CString functions
authorbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Aug 2012 18:55:11 +0000 (18:55 +0000)
committerbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Aug 2012 18:55:11 +0000 (18:55 +0000)
commit3be2613eced081a8a06b4c6eeefbf25e9d8d8e91
treef26335c1a0abbabcf21a02d8789de1070ec185a8
parent85f59a8de50d441ae3a27015ecb52f987ada4b10
Even up WTF::String to CString functions
https://bugs.webkit.org/show_bug.cgi?id=95008

Reviewed by Sam Weinig.

Apply advantages from UString to WTF::String.

* wtf/text/WTFString.cpp:
(WTF::String::ascii): There is no need to special case the null length, both
following branches use CString::newUninitialized(), which create empty string
for null length.
(WTF::String::latin1): Use characters16() instead of characters() to avoid
testing is8Bit() a second time.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/text/WTFString.cpp