diff options
Diffstat (limited to 'Source/Library/Common/BasicString.class.cpp')
-rw-r--r-- | Source/Library/Common/BasicString.class.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/Library/Common/BasicString.class.cpp b/Source/Library/Common/BasicString.class.cpp index ddb4e2c..125d420 100644 --- a/Source/Library/Common/BasicString.class.cpp +++ b/Source/Library/Common/BasicString.class.cpp @@ -183,3 +183,12 @@ BasicString<T> BasicString<T>::substr(s32int start, s32int size) { memcpy((u8int*)ret.m_string, (u8int*)(&m_string[start]), size * sizeof(T)); return ret; } + +template <typename T> +bool BasicString<T>::operator<(const BasicString<T>& other) const { + for (u32int i = 0; i < m_length && i < other.m_length; i++) { + if (m_string[i] < other.m_string[i]) return true; + } + if (m_length < other.m_length) return true; + return false; +} |