diff options
Diffstat (limited to 'core/fxcrt/cfx_string_c_template.h')
-rw-r--r-- | core/fxcrt/cfx_string_c_template.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/fxcrt/cfx_string_c_template.h b/core/fxcrt/cfx_string_c_template.h index c46b0c4671..6bc71d853d 100644 --- a/core/fxcrt/cfx_string_c_template.h +++ b/core/fxcrt/cfx_string_c_template.h @@ -135,6 +135,12 @@ class CFX_StringCTemplate { return m_Ptr.Get()[index]; } + UnsignedType First() const { return GetLength() ? (*this)[0] : 0; } + + UnsignedType Last() const { + return GetLength() ? (*this)[GetLength() - 1] : 0; + } + const CharType CharAt(const FX_STRSIZE index) const { ASSERT(IsValidIndex(index)); return static_cast<CharType>(m_Ptr.Get()[index]); |