src/string.h

changeset 257
481566b60ecd
parent 251
c4b96bc41298
child 272
2074672a6554
equal deleted inserted replaced
256:9f7e6e288953 257:481566b60ecd
43 43
44 void append (const char* data) { m_string.append (data); } 44 void append (const char* data) { m_string.append (data); }
45 void append (const char data) { m_string.push_back (data); } 45 void append (const char data) { m_string.push_back (data); }
46 void append (const String data) { m_string.append (data.chars ()); } 46 void append (const String data) { m_string.append (data.chars ()); }
47 it begin () { return m_string.begin (); } 47 it begin () { return m_string.begin (); }
48 c_it begin () const { return m_string.cbegin (); }
48 const char* c () const { return chars (); } 49 const char* c () const { return chars (); }
49 size_t capacity () const { return m_string.capacity (); } 50 size_t capacity () const { return m_string.capacity (); }
50 const char* chars () const { return m_string.c_str (); } 51 const char* chars () const { return m_string.c_str (); }
51 int compare (const char* other) const { return m_string.compare (other); } 52 int compare (const char* other) const { return m_string.compare (other); }
52 int compare (String other) const { return m_string.compare (other); } 53 int compare (String other) const { return m_string.compare (other); }
53 it end () { return m_string.end (); } 54 it end () { return m_string.end (); }
54 c_it cbegin () const { return m_string.cbegin (); } 55 c_it end () const { return m_string.end (); }
55 c_it cend () const { return m_string.end (); }
56 void clear () { m_string.clear (); } 56 void clear () { m_string.clear (); }
57 ushort count (const char needle) const; 57 ushort count (const char needle) const;
58 bool empty () const { return m_string.empty (); } 58 bool empty () const { return m_string.empty (); }
59 void erase (size_t pos) { m_string.erase (m_string.begin () + pos); } 59 void erase (size_t pos) { m_string.erase (m_string.begin () + pos); }
60 int first (const char* c, int a = 0) const; 60 int first (const char* c, int a = 0) const;

mercurial