BAN: String add front() and back() helpers
This commit is contained in:
parent
dd84a2175f
commit
10e0c90fde
|
@ -46,6 +46,12 @@ namespace BAN
|
|||
const_iterator end() const { return const_iterator(m_data + m_size); }
|
||||
iterator end() { return iterator(m_data + m_size); }
|
||||
|
||||
char front() const { ASSERT(!empty()); return m_data[0]; }
|
||||
char& front() { ASSERT(!empty()); return m_data[0]; }
|
||||
|
||||
char back() const { ASSERT(!empty()); return m_data[m_size - 1]; }
|
||||
char& back() { ASSERT(!empty()); return m_data[m_size - 1]; }
|
||||
|
||||
char operator[](size_type) const;
|
||||
char& operator[](size_type);
|
||||
|
||||
|
|
Loading…
Reference in New Issue