|
Maps SDK for C++ 1.0.0
|


Public Member Functions | |
| String () | |
| Create an empty string object. | |
| String (const char *str, int len=-1) | |
| Create and initialize a string object from an utf8 char string. | |
| String (const char16_t *str, int len=-1) | |
| Create and initialize a string object from a char16_t string. | |
| String (const char32_t *str, int len=-1) | |
| Create and initialize a string object from a char32_t string. | |
| String (const std::string &str) | |
| Create and initialize a string object from a std::string. | |
| String (const std::u16string &str) | |
| Create and initialize a string object from a std::u16string. | |
| String (const std::u32string &str) | |
| Create and initialize a string object from a std::u32string. | |
| String (const StdString &str) | |
| Create and initialize a string object from a StdString. | |
| String (const String &string)=default | |
| Default copy constructor. | |
| String (String &&string)=default | |
| Default move constructor noexcept is deduced. | |
| String & | operator= (const String &string)=default |
| Default copy assignment. | |
| String & | operator= (String &&string)=default |
| Default move assignment noexcept is deduced. | |
| String & | operator= (const char *str) |
| Assign to String from char*. | |
| String & | operator= (const char16_t *str) |
| Assign to String from char16_t*. | |
| String & | operator= (const char32_t *str) |
| Assign to String from char32_t*. | |
| String & | operator= (const std::string &str) |
| Assign to String from std::string. | |
| String & | operator= (const std::u16string &str) |
| Assign to String from std::u16string. | |
| String & | operator= (const std::u32string &str) |
| Assign to String from std::u32string. | |
| bool | operator== (const String &str) const |
| Equal operator. | |
| bool | operator!= (const String &str) const |
| Not Equal operator. | |
| bool | operator< (const String &str) const |
| Less Than operator. | |
| bool | operator<= (const String &str) const |
| Less Than or Equal operator. | |
| bool | operator> (const String &str) const |
| Greater Than operator. | |
| bool | operator>= (const String &str) const |
| Greater Than or Equal operator. | |
| char16_t | operator[] (int pos) const |
| Character access at the given index. | |
| char16_t | front () const |
| First character access. | |
| char16_t & | front () |
| First character access. | |
| char16_t | back () const |
| Last character access. | |
| char16_t & | back () |
| Last character access. | |
| String & | operator+= (const String &s) |
| Append String operator. | |
| String & | operator+= (const char16_t *s) |
| Append char16_t string operator. | |
| String & | operator+= (char16_t c) |
| Append char16_t char operator. | |
| String & | append (const char *str, int len=-1) |
| Append from a char string. | |
| String & | append (const char16_t *str, int len=-1) |
| Append from a char16_t string. | |
| String & | append (const String &str) |
| Append from a String. | |
| String & | append (char16_t ch) |
| Append from a char16_t char. | |
| String & | assign (const char *str, int len=-1) |
| Assign from a char string. | |
| String & | assign (const char16_t *str, int len=-1) |
| Assign from a char16_t string. | |
| String & | assign (const char32_t *str, int len=-1) |
| Assign from a char32_t string. | |
| String & | assign (const std::string &str) |
| Assign from a std::string. | |
| String & | assign (const std::u16string &str) |
| Assign from a std::u16string. | |
| String & | assign (const std::u32string &str) |
| Assign from a std::u32string. | |
| String & | clear () |
| Clear the string(sets string to empty). | |
| int | compareCaseInsensitive (String const &str) const |
| Case-insensitive comparison between current string and string provided as parameter. | |
| int | compareCaseSensitive (String const &str) const |
| Case-sensitive comparison between current string and string provided as parameter. | |
| bool | contains (const char16_t *str, int from=0) const |
| Check if string contains specified char16_t sub-string. | |
| bool | contains (const String &str, int from=0) const |
| Check if string contains specified String sub-string. | |
| bool | contains (char16_t ch, int from=0) const |
| Check if string contains specified char16_t character. | |
| template<typename TChar16Convertible = char16_t> | |
| TChar16Convertible * | data () |
| Data buffer access as char16_t pointer. | |
| template<typename TChar16Convertible = char16_t> | |
| const TChar16Convertible * | constData () const |
| Data buffer access as read-only char16_t pointer. | |
| bool | empty () const |
| Check if string is empty. | |
| int | find (const char16_t *str, int from=0) const |
| Find a char16_t sub-string. | |
| int | find (const String &str, int from=0) const |
| Find a String sub-string. | |
| int | find (const char16_t ch, int from=0) const |
| Find a char16_t character. | |
| int | findLast (const char16_t *str, int from=-1) const |
| Find last occurrence of a substring. | |
| int | findLast (const String &str, int from=-1) const |
| Find last occurrence of a substring. | |
| int | findLast (const char16_t ch, int from=-1) const |
| Find last occurrence of a character. | |
| int | findSeparators (const char16_t *sep, int from=0) const |
| Find first occurrence of any of separators in specified collection. | |
| int | findSeparators (const String &sep, int from=0) const |
| Find first occurrence of any of separators in specified collection. | |
| String & | insert (int from, const String &str) |
| Insert the given string at the given position. | |
| String & | insert (int from, char16_t ch) |
| Insert the given character at the given position. | |
| String & | insert (int from, const char16_t *ch) |
| Insert the given character array at the given position. | |
| template<typename ... TArgs> | |
| String & | format (const char *format, TArgs &&... args) |
| Format string in sprintf style. | |
| template<typename ... TArgs> | |
| String & | format (const char16_t *format, TArgs &&... args) |
| Format string in sprintf style. | |
| template<typename ... TArgs> | |
| String & | format (const String &format, TArgs &&... args) |
| Format string in sprintf style. | |
| String | left (int len) const |
| Substring containing the n leftmost characters of the string. | |
| String | right (int len) const |
| Substring containing the n rightmost characters of the string. | |
| String | mid (int start, int len=-1) const |
| Substring containing the characters starting from position and given length. | |
| String & | prepend (const char *str, int len=-1) |
| Prepend from a char string. | |
| String & | prepend (const char16_t *str, int len=-1) |
| Prepend from a char16_t string. | |
| String & | prepend (const String &str) |
| Prepend from a String. | |
| String & | remove (int from, int len) |
| Remove characters from string. | |
| String & | replace (int from, int len, const char16_t *str) |
| Replace part of string with given sub-string. | |
| String & | replace (int from, int len, const String &str) |
| Replace part of string with given sub-string. | |
| String & | replace (const String &before, const String &after) |
| Replace every occurrence of the string before with the string after. | |
| String & | replaceInSet (const char16_t *cset, char16_t c) |
| Replace all characters in set with new one. | |
| void | set (int pos, char16_t c) |
| Set the character at the given position. | |
| int | size () const |
| Get string length. | |
| String & | resize (int len, char16_t c=0) |
| Set string length. | |
| template<typename Collector> | |
| void | split (const char16_t *seps, Collector collector, bool collectEmpty=false) const |
| Split the string based on the given separators collection. | |
| template<typename Collector> | |
| void | split (const String &seps, Collector collector, bool collectEmpty=false) const |
| Split string at positions where any one of specified separators is found. | |
| String | toUpper (int from=0, int len=-1) const |
| Convert to uppercase string. | |
| String | toLower (int from=0, int len=-1) const |
| Convert to lowercase string. | |
| int | toInt (int from=0, int len=-1) const |
| Convert to integer. | |
| LargeInteger | toLargeInt (int from=0, int len=-1) const |
| Convert to LargeInteger. | |
| double | toFloat (int from=0, int len=-1) const |
| Convert to float. | |
| std::string | toStdString (int from=0, int len=-1) const |
| Convert to std::string. | |
| std::u16string | toStdString16 (int from=0, int len=-1) const |
| Convert to std::u16string. | |
| std::u32string | toStdString32 (int from=0, int len=-1) const |
| Convert to std::u32string. | |
| String & | trim () |
| Trim white spaces from string. | |
| String | trimmed () const |
| Get a trimmed string from this. | |
| void | truncate (int len) |
| Truncate the string to the given length. | |
| bool | isRightToLeft () const |
| Check if string contains right-to-left substring sequences. | |
| unsigned | hashCode () const |
| String hash code. | |
| String & | fallbackToLegacyUnicode () |
| Replace some later unicode version characters with older legacy ones. | |
Static Public Member Functions | |
| template<typename ... TArgs> | |
| static String | formatString (const char16_t *format, TArgs &&... args) |
| Format string in sprintf style. | |
| template<typename ... TArgs> | |
| static String | formatString (const String &format, TArgs &&... args) |
| Format string in sprintf style. | |
String object.
Implements share-read / copy-on-write Api object over IString.
|
inline |
Create and initialize a string object from an utf8 char string.
| [in] | str | 8-bit char initialization string, must NOT be nullptr. |
| [in] | len | Characters count copied from initialization string. Default -1 means whole string will be copied. |
|
inline |
Create and initialize a string object from a char16_t string.
| [in] | str | char16_t initialization string, must NOT be nullptr. |
| [in] | len | Characters count copied from initialization string. Default -1 means whole string will be copied. |
|
inline |
Create and initialize a string object from a char32_t string.
| [in] | str | char32_t initialization string, must NOT be nullptr. |
| [in] | len | Characters count copied from initialization string. Default -1 means whole string will be copied. |
|
inline |
Create and initialize a string object from a std::string.
| [in] | str | std::string initialization string, must NOT be nullptr. |
|
inline |
Create and initialize a string object from a std::u16string.
| [in] | str | std::u16string initialization string, must NOT be nullptr. |
|
inline |
Create and initialize a string object from a std::u32string.
| [in] | str | std::u32string initialization string, must NOT be nullptr. |
|
inline |
Create and initialize a string object from a StdString.
| [in] | str | StdString initialization string, must NOT be nullptr. |
|
default |
Default copy constructor.
| [in] | string | Source string |
|
default |
Default move constructor noexcept is deduced.
| [in] | string | Source string |
|
inline |
Append from a char16_t char.
| [in] | ch | Source char16_t char. |
|
inline |
Append from a char string.
| [in] | str | Source char string, must NOT be nullptr. |
| [in] | len | Characters count copied from the source string. Default -1 means whole string will be copied. |
|
inline |
Append from a char16_t string.
| [in] | str | Source char16_t string, must NOT be nullptr. |
| [in] | len | Characters count copied from the source string. Default -1 means whole string will be copied. |
Append from a String.
| [in] | str | Source string, must NOT be nullptr. |
|
inline |
Assign from a char string.
| [in] | str | Initialization string, must NOT be nullptr. |
| [in] | len | Characters count copied from initialization string. Default -1 means whole string will be copied. |
|
inline |
Assign from a char16_t string.
| [in] | str | Initialization string, must NOT be nullptr. |
| [in] | len | Characters count copied from initialization string. Default -1 means whole string will be copied. |
|
inline |
Assign from a char32_t string.
| [in] | str | Initialization string, must NOT be nullptr. |
| [in] | len | Characters count copied from initialization string. Default -1 means whole string will be copied. |
|
inline |
Assign from a std::string.
| [in] | str | Initialization string, must NOT be nullptr. |
|
inline |
Assign from a std::u16string.
| [in] | str | Initialization string, must NOT be nullptr. |
|
inline |
Assign from a std::u32string.
| [in] | str | Initialization string, must NOT be nullptr. |
|
inline |
Last character access.
|
inline |
Last character access.
|
inline |
Clear the string(sets string to empty).
|
inline |
Case-insensitive comparison between current string and string provided as parameter.
| [in] | str | String to compare with |
|
inline |
Case-sensitive comparison between current string and string provided as parameter.
| [in] | str | String to compare with |
|
inline |
Data buffer access as read-only char16_t pointer.
| TChar16Convertible | Char16 convertible type |
|
inline |
Check if string contains specified char16_t character.
| [in] | ch | Character to search for |
| [in] | from | Zero-based position index where to start searching |
|
inline |
Check if string contains specified char16_t sub-string.
| [in] | str | Sub-string to search for |
| [in] | from | Zero-based position index where to start searching |
|
inline |
Check if string contains specified String sub-string.
| [in] | str | Sub-string to search for |
| [in] | from | Zero-based position index where to start searching |
|
inline |
Data buffer access as char16_t pointer.
| TChar16Convertible | Char16 convertible type |
|
inline |
Check if string is empty.
|
inline |
Replace some later unicode version characters with older legacy ones.
Can be used to correct display on some fonts which are missing them
|
inline |
Find a char16_t sub-string.
| [in] | str | Sub-string to search for |
| [in] | from | Zero-based position index where to start searching |
|
inline |
Find a char16_t character.
| [in] | ch | Character to search for |
| [in] | from | Zero-based position index where to start searching |
|
inline |
Find a String sub-string.
| [in] | str | Sub-string to search for |
| [in] | from | Zero-based position index where to start searching |
|
inline |
Find last occurrence of a substring.
Search position positive values are string start based and should be in [0, size()-1] interval
Search position negative values are string end based and should be in [-1, -size()] interval
| [in] | str | Sub-string to search for |
| [in] | from | Zero-based position index where to start searching |
|
inline |
Find last occurrence of a character.
| [in] | ch | Character to search for |
| [in] | from | Zero-based position index where to start searching |
|
inline |
Find last occurrence of a substring.
| [in] | str | Sub-string to search for |
| [in] | from | Zero-based position index where to start searching |
|
inline |
Find first occurrence of any of separators in specified collection.
| [in] | sep | Collection of separators |
| [in] | from | Zero-based position index where to start searching |
|
inline |
Find first occurrence of any of separators in specified collection.
| [in] | sep | Collection of separators |
| [in] | from | Zero-based position index where to start searching |
|
inline |
Format string in sprintf style.
See sprintf man page for format specifications
| [in] | format | Format char string |
| [in] | args | Format arguments. Allowed values are integers, floating point, pointers, char*, char16_t*, char32_t* and String and String convertible types. |
| TArgs | Argument types |
|
inline |
Format string in sprintf style.
See sprintf man page for format specifications.
| [in] | format | Format char16_t string. |
| [in] | args | Format arguments. Allowed values are integers, floating point, pointers, char*, char16_t*, char32_t* and String and String convertible types. |
| TArgs | Argument types |
|
inline |
Format string in sprintf style.
See sprintf man page for format specifications.
| [in] | format | Format String string. |
| [in] | args | Format arguments. Allowed values are integers, floating point, pointers, char*, char16_t*, char32_t* and String and String convertible types. |
| TArgs | Argument types |
|
inlinestatic |
Format string in sprintf style.
See sprintf man page for format specifications.
static function, can be used without instantiating an instance of this class.
| [in] | format | Format char16_t string. |
| [in] | args | Format arguments. Allowed values are integers, floating point, pointers, char*, char16_t*, char32_t* and String and String convertible types. |
| TArgs | Argument types |
|
inlinestatic |
Format string in sprintf style.
See sprintf man page for format specifications.
static function, can be used without instantiating an instance of this class.
| [in] | format | Format String string. |
| [in] | args | Format arguments. Allowed values are integers, floating point, pointers, char*, char16_t*, char32_t* and String and String convertible types. |
| TArgs | Argument types |
|
inline |
First character access.
|
inline |
First character access.
|
inline |
String hash code.
|
inline |
Insert the given character at the given position.
| [in] | from | Position where to insert the character |
| [in] | ch | Character to insert |
|
inline |
Insert the given character array at the given position.
| [in] | from | Position where to insert the character array |
| [in] | ch | Character array to insert |
Insert the given string at the given position.
| [in] | from | Position where to insert the string |
| [in] | str | String to insert |
|
inline |
Check if string contains right-to-left substring sequences.
|
inline |
Substring containing the n leftmost characters of the string.
| [in] | len | Number of characters to copy. |
|
inline |
Substring containing the characters starting from position and given length.
| [in] | start | Zero-based position index where to start. |
| [in] | len | Number of characters to copy. Default -1 means whole string will be copied. |
|
inline |
Not Equal operator.
| [in] | str | String to compare with |
|
inline |
Append char16_t char operator.
| [in] | c | Source char16_t char |
|
inline |
Append char16_t string operator.
| [in] | s | Source char16_t string, must NOT be nullptr. |
|
inline |
Less Than operator.
| [in] | str | String to compare with |
|
inline |
Less Than or Equal operator.
| [in] | str | String to compare with |
|
inline |
Assign to String from char*.
| [in] | str | Source char string, must NOT be nullptr. |
|
inline |
Assign to String from char16_t*.
| [in] | str | Source char16_t string, must NOT be nullptr. |
|
inline |
Assign to String from char32_t*.
| [in] | str | Source char32_t string, must NOT be nullptr. |
|
inline |
Assign to String from std::string.
| [in] | str | Source std::string |
|
inline |
Assign to String from std::u16string.
| [in] | str | Source std::u16string |
|
inline |
Assign to String from std::u32string.
| [in] | str | Source std::u32string |
Default copy assignment.
| [in] | string | Source string |
Default move assignment noexcept is deduced.
| [in] | string | Source string |
|
inline |
Equal operator.
| [in] | str | String to compare with |
|
inline |
Greater Than operator.
| [in] | str | String to compare with |
|
inline |
Greater Than or Equal operator.
| [in] | str | String to compare with |
|
inline |
Character access at the given index.
| [in] | pos | Index. Must be valid, i.e. 0 <= pos < length |
|
inline |
Prepend from a char string.
| [in] | str | Source string, must NOT be nullptr. |
| [in] | len | Characters count copied from the source string. Default -1 means whole string will be copied. |
|
inline |
Prepend from a char16_t string.
| [in] | str | Source string, must NOT be nullptr. |
| [in] | len | Characters count copied from the source string. Default -1 means whole string will be copied. |
Prepend from a String.
| [in] | str | Source string, must NOT be nullptr. |
|
inline |
Remove characters from string.
| [in] | from | Zero-based position index where to start. |
| [in] | len | Number of characters to remove. |
Replace every occurrence of the string before with the string after.
| [in] | before | Sub-string to search for |
| [in] | after | Sub-string to replace with |
|
inline |
Replace part of string with given sub-string.
| [in] | from | Zero-based position index where to start. |
| [in] | len | Number of characters to replace. |
| [in] | str | Source char16_t string where to copy characters from. |
Replace part of string with given sub-string.
| [in] | from | Zero-based position index where to start. |
| [in] | len | Number of characters to replace. |
| [in] | str | Source String where to copy characters from. |
|
inline |
Replace all characters in set with new one.
| [in] | cset | Set of characters to replace |
| [in] | c | New character |
|
inline |
Set string length.
If the string length is bigger it will be truncated to the given length
If the string length is smaller the given char will be appended until the given length
| [in] | len | New string length |
| [in] | c | Character to append if the string is shorter than the given length. Default value is 0. |
|
inline |
Substring containing the n rightmost characters of the string.
| [in] | len | Number of characters to copy. |
|
inline |
Set the character at the given position.
| [in] | pos | Position where to set the character |
| [in] | c | Character to set |
|
inline |
Get string length.
|
inline |
Split the string based on the given separators collection.
| [in] | seps | Separators list |
| [in] | collector | Substrings collector callback: bool (*)( const char16_t *substring, int size ). If return true, the splitting continues, if return false the splitting ends |
| [in] | collectEmpty | Collect empty strings ( between 2 consecutive separators ) |
Substrings are passed one by one to the caller via the callback method
| Collector | Substrings collector callback type |
|
inline |
Split string at positions where any one of specified separators is found.
| [in] | seps | Separators list |
| [in] | collectEmpty | Collect empty strings ( between 2 consecutive separators ) |
| Collector | Substrings collector callback type |
| [in] | collector | Substrings collector callback: bool (*)( const char16_t *substring, int size ). If return true, the splitting continues, if return false the splitting ends |
|
inline |
Convert to float.
| [in] | from | Zero-based position index where to start. |
| [in] | len | Number of characters to convert. Default -1 means whole string will be converted. |
|
inline |
Convert to integer.
| [in] | from | Zero-based position index where to start. |
| [in] | len | Number of characters to convert. Default -1 means whole string will be converted. |
|
inline |
Convert to LargeInteger.
| [in] | from | Zero-based position index where to start. |
| [in] | len | Number of characters to convert. Default -1 means whole string will be converted. |
|
inline |
Convert to lowercase string.
| [in] | from | Zero-based position index where to start. |
| [in] | len | Number of characters to convert. Default -1 means whole string will be converted. |
|
inline |
Convert to std::string.
| [in] | from | Zero-based position index where to start. |
| [in] | len | Number of characters to convert. Default -1 means whole string will be converted. |
|
inline |
Convert to std::u16string.
| [in] | from | Zero-based position index where to start. |
| [in] | len | Number of characters to convert. Default -1 means whole string will be converted. |
|
inline |
Convert to std::u32string.
| [in] | from | Zero-based position index where to start. |
| [in] | len | Number of characters to convert. Default -1 means whole string will be converted. |
|
inline |
Convert to uppercase string.
| [in] | from | Zero-based position index where to start. |
| [in] | len | Number of characters to convert. Default -1 means whole string will be converted. |
|
inline |
Trim white spaces from string.
|
inline |
Get a trimmed string from this.
|
inline |
Truncate the string to the given length.
| [in] | len | The new string length |