src/string.h

changeset 236
b58d35dc5d52
parent 191
9bb6a17305ad
child 237
ec77f6e9a19f
equal deleted inserted replaced
235:bb0a7bcca7eb 236:b58d35dc5d52
56 c_it cend () const { return m_string.end (); } 56 c_it cend () const { return m_string.end (); }
57 void clear () { m_string.clear (); } 57 void clear () { m_string.clear (); }
58 ushort count (const char needle) const; 58 ushort count (const char needle) const;
59 bool empty () const { return m_string.empty (); } 59 bool empty () const { return m_string.empty (); }
60 void erase (size_t pos) { m_string.erase (m_string.begin () + pos); } 60 void erase (size_t pos) { m_string.erase (m_string.begin () + pos); }
61 size_t first (const char* other, size_t pos = 0) const { return m_string.find_first_of (other, pos); } 61 int first (const char* c, int a = 0) const;
62 size_t first (const char other, size_t pos = 0) const { return m_string.find_first_of (other, pos); }
63 size_t first (const String other, size_t pos = 0) const { return m_string.find_first_of (other, pos); }
64 void format (const char* fmtstr, ...); 62 void format (const char* fmtstr, ...);
65 void insert (size_t pos, char c) { m_string.insert (m_string.begin () + pos, c); } 63 void insert (size_t pos, char c) { m_string.insert (m_string.begin () + pos, c); }
66 size_t last (const char* other, size_t pos = 0) const { return m_string.find_last_of (other, pos); } 64 int last (const char* c, int a = -1) const;
67 size_t last (const char other, size_t pos = 0) const { return m_string.find_last_of (other, pos); }
68 size_t last (const String other, size_t pos = 0) const { return m_string.find_last_of (other, pos); }
69 size_t len () const { return m_string.length (); } 65 size_t len () const { return m_string.length (); }
70 String lower () const; 66 String lower () const;
71 size_t maxSize () const { return m_string.max_size (); } 67 size_t maxSize () const { return m_string.max_size (); }
72 void replace (const char* a, const char* b); 68 void replace (const char* a, const char* b);
73 void resize (size_t n) { m_string.resize (n); } 69 void resize (size_t n) { m_string.resize (n); }

mercurial