Changeset 56864 in webkit for trunk/JavaScriptCore/runtime/UString.h
- Timestamp:
- Mar 31, 2010, 1:36:21 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/UString.h
r56560 r56864 34 34 #include <wtf/RefPtr.h> 35 35 #include <wtf/Vector.h> 36 #include <wtf/text/CString.h> 36 37 #include <wtf/unicode/Unicode.h> 37 38 … … 40 41 using WTF::PlacementNewAdoptType; 41 42 using WTF::PlacementNewAdopt; 42 43 class CString {44 public:45 CString()46 : m_length(0)47 , m_data(0)48 {49 }50 51 CString(const char*);52 CString(const char*, size_t);53 CString(const CString&);54 55 ~CString();56 57 static CString adopt(char*, size_t); // buffer should be allocated with new[].58 59 CString& append(const CString&);60 CString& operator=(const char* c);61 CString& operator=(const CString&);62 CString& operator+=(const CString& c) { return append(c); }63 64 size_t length() const { return m_length; }65 const char* data() const { return m_data; }66 67 private:68 size_t m_length;69 char* m_data;70 };71 72 bool operator==(const CString&, const CString&);73 74 typedef Vector<char, 32> CStringBuffer;75 43 76 44 class UString {
Note:
See TracChangeset
for help on using the changeset viewer.