This is a simple string class template that always uses a fixed amount of memory for a single string.
If you attempt to set a longer string to it it'll simply crop it. FOR BACKWARDS COMPATABILITY ONLY. Given the lack of utility provided, you are much
Name | Description |
---|---|
T CharType | Make the template parameters visible properties, so users can create local objects to match. |
Name | Description |
---|---|
const s32 MaxStringLength = MSL | Make the template parameters visible properties, so users can create local objects to match. |
Name | Description |
---|---|
~GeoFixedString() | Destructor. |
Clear() | Clear the string. |
CropAfterLastChar(T) | This will remove the string beyond and including the last character specified if there is one. |
CropBeforeLastChar(T) | This will remove the string up to and including the last character specified if there is one. |
Empty() | Returns true if the string is empty. |
FromUtf8(const char *) | Creates a new string of this format from a narrow string. |
GeoFixedString() | Default constructor. |
GeoFixedString(const T *) | Explicit constructor from a raw C string. |
GeoFixedString(const T *, s32) | Constructor with raw string and fixed termination point. |
GeoFixedString(const GeoFixedString &) | Copy constructor. |
GetCString() | Returns a const raw pointer to the string. |
GetLength() | Returns the length of the string. |
GetMaxLength() | Returns the maximum length string this object can store. |
operator<(const GeoFixedString &) | Comparison (required to use strings as keys in a map). |
ToUtf8() | Returns a new narrow string from this one. |
public: ~GeoFixedString()
Destructor.
public: void Clear()
Clear the string.
public: bool CropAfterLastChar
(
T c
)
This will remove the string beyond and including the last character specified if there is one.
If there isn't one it won't do anything.
True if the string was cropped.
public: bool CropBeforeLastChar
(
T c
)
This will remove the string up to and including the last character specified if there is one.
If there isn't one it won't do anything.
True if the string was cropped.
public: bool Empty() const
Returns true if the string is empty.
public: GeoFixedString FromUtf8
(
const char * utf8
)
Creates a new string of this format from a narrow string.
public: GeoFixedString()
Default constructor.
public: GeoFixedString
(
const T * str
)
Explicit constructor from a raw C string.
public: GeoFixedString
(
const T * str,
s32 length
)
Constructor with raw string and fixed termination point.
public: GeoFixedString
(
const GeoFixedString & rhs
)
Copy constructor.
public: const T * GetCString() const
Returns a const raw pointer to the string.
public: s32 GetLength() const
Returns the length of the string.
public: s32 GetMaxLength() const
Returns the maximum length string this object can store.
public: bool operator<
(
const GeoFixedString & rhs
) const
Comparison (required to use strings as keys in a map).
public: GeoFixedString< char, MSL > ToUtf8() const
Returns a new narrow string from this one.