2006-08-31 Anders Carlsson <acarlsson@apple.com>
authorandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Aug 2006 21:05:51 +0000 (21:05 +0000)
committerandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Aug 2006 21:05:51 +0000 (21:05 +0000)
commitb5e6ab698f1652094d99d96923c6e9f113684695
tree7dfaa606ffe263ec47dc0e2d05b13fa5ef7b14b3
parent1e4ebb8a2a2d4b131c148e2c53292ff7a7ac846c
2006-08-31  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Maciej.

        Add CString. CString is a simple, null-terminated byte buffer that supports data
        sharing. Its main use is to be a better const char*.

        Also add latin1 and utf8 methods to String which returns CStrings.

        * platform/CString.cpp: Added.
        (WebCore::CString::CString):
        (WebCore::CString::init):
        (WebCore::CString::data):
        (WebCore::CString::length):
        (WebCore::CString::deprecatedCString):
        * platform/CString.h: Added.
        (WebCore::CStringBuffer::CStringBuffer):
        (WebCore::CStringBuffer::data):
        (WebCore::CStringBuffer::length):
        (WebCore::CString::CString):
        (WebCore::CString::operator const char*):
        (WebCore::CString::isNull):
        * platform/PlatformString.h:
        * platform/String.cpp:
        (WebCore::String::latin1):
        (WebCore::String::utf8):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16153 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/platform/CString.cpp [new file with mode: 0644]
WebCore/platform/CString.h [new file with mode: 0644]
WebCore/platform/PlatformString.h
WebCore/platform/String.cpp