Extended FString class with functions to get first and last characters

This commit is contained in:
alexey.lysiuk 2017-10-23 11:49:54 +03:00
parent 3e43572a87
commit d526ddf7ae
1 changed files with 3 additions and 0 deletions

View File

@ -187,6 +187,9 @@ public:
FString &operator << (char tail) { return *this += tail; }
FString &operator << (const FName &name) { return *this += name.GetChars(); }
const char &Front() const { assert(IsNotEmpty()); return Chars[0]; }
const char &Back() const { assert(IsNotEmpty()); return Chars[Len() - 1]; }
FString Left (size_t numChars) const;
FString Right (size_t numChars) const;
FString Mid (size_t pos, size_t numChars = ~(size_t)0) const;