|
Kodi Docs 20.0
Kodi is an open source media player and entertainment hub.
|
Edits given texts
This is used to revise the respective strings and to get them in the desired format.
More...
Functions | |
| static void | kodi::tools::StringUtils::ToUpper (std::string &str) |
| Convert a string to uppercase. More... | |
| static void | kodi::tools::StringUtils::ToUpper (std::wstring &str) |
| Convert a 16bit wide string to uppercase. More... | |
| static void | kodi::tools::StringUtils::ToLower (std::string &str) |
| Convert a string to lowercase. More... | |
| static void | kodi::tools::StringUtils::ToLower (std::wstring &str) |
| Convert a 16bit wide string to lowercase. More... | |
| static int | kodi::tools::StringUtils::ReturnDigits (const std::string &str) |
| Combine all numerical digits and give it as integer value. More... | |
| static std::string | kodi::tools::StringUtils::Left (const std::string &str, size_t count) |
| Returns a string from start with givent count. More... | |
| static std::string | kodi::tools::StringUtils::Mid (const std::string &str, size_t first, size_t count=std::string::npos) |
| Get substring from mid of given string. More... | |
| static std::string | kodi::tools::StringUtils::Right (const std::string &str, size_t count) |
| Returns a string from end with givent count. More... | |
| static std::string & | kodi::tools::StringUtils::Trim (std::string &str) |
| Trim a string with remove of not wanted spaces at begin and end of string. More... | |
| static std::string & | kodi::tools::StringUtils::Trim (std::string &str, const char *const chars) |
| Trim a string with remove of not wanted characters at begin and end of string. More... | |
| static std::string & | kodi::tools::StringUtils::TrimLeft (std::string &str) |
| Trim a string with remove of not wanted spaces at begin of string. More... | |
| static std::string & | kodi::tools::StringUtils::TrimLeft (std::string &str, const char *const chars) |
| Trim a string with remove of not wanted characters at begin of string. More... | |
| static std::string & | kodi::tools::StringUtils::TrimRight (std::string &str) |
| Trim a string with remove of not wanted spaces at end of string. More... | |
| static std::string & | kodi::tools::StringUtils::TrimRight (std::string &str, const char *const chars) |
| Trim a string with remove of not wanted characters at end of string. More... | |
| static std::string & | kodi::tools::StringUtils::RemoveDuplicatedSpacesAndTabs (std::string &str) |
| Cleanup string by remove of duplicates of spaces and tabs. More... | |
| static int | kodi::tools::StringUtils::Replace (std::string &str, char oldChar, char newChar) |
| Replace a character with another inside text string. More... | |
| static int | kodi::tools::StringUtils::Replace (std::string &str, const std::string &oldStr, const std::string &newStr) |
| Replace a complete text with another inside text string. More... | |
| static int | kodi::tools::StringUtils::Replace (std::wstring &str, const std::wstring &oldStr, const std::wstring &newStr) |
| Replace a complete text with another inside 16bit wide text string. More... | |
| static std::string | kodi::tools::StringUtils::MakeSafeUrl (const std::string &str) |
| Transform characters to create a safe URL. More... | |
| static std::string | kodi::tools::StringUtils::MakeSafeString (const std::string &str) |
| Transform characters to create a safe, printable string. More... | |
| static std::string | kodi::tools::StringUtils::RemoveMACAddress (const std::string &str) |
| Removes a MAC address from a given string. More... | |
| static void | kodi::tools::StringUtils::RemoveCRLF (std::string &strLine) |
| Remove carriage return and line feeds on string ends. More... | |
| static void | kodi::tools::StringUtils::WordToDigits (std::string &word) |
| Convert a word to a digit numerical string. More... | |
| static std::string | kodi::tools::StringUtils::Paramify (const std::string ¶m) |
| Escapes the given string to be able to be used as a parameter. More... | |
Edits given texts
This is used to revise the respective strings and to get them in the desired format.
|
inlinestatic |
Returns a string from start with givent count.
| [in] | str | String to use |
| [in] | count | Amount of characters to go from left |
Example:
|
inlinestatic |
Transform characters to create a safe, printable string.
| [in] | str | The string to transform |
Unsafe characters are defined as the non-printable ASCII characters (character code 0-31).
|
inlinestatic |
Transform characters to create a safe URL.
| [in] | str | The string to transform |
Safe URLs are composed of the unreserved characters defined in RFC 3986 section 2.3:
ALPHA / DIGIT / "-" / "." / "_" / "~"
Characters outside of this set will be replaced by "_".
|
inlinestatic |
Get substring from mid of given string.
| [in] | str | String to get substring from |
| [in] | first | Position from where to start |
| [in] | count | [opt] length of position to get after start, default is complete to end |
Example:
|
inlinestatic |
Escapes the given string to be able to be used as a parameter.
Escapes backslashes and double-quotes with an additional backslash and adds double-quotes around the whole string.
| [in] | param | String to escape/paramify |
Example:
|
inlinestatic |
Remove carriage return and line feeds on string ends.
| [in,out] | str | String where CR and LF becomes removed on end |
Example:
|
inlinestatic |
Cleanup string by remove of duplicates of spaces and tabs.
| [in,out] | str | String to remove duplicates, becomes also changed and given further on return |
|
inlinestatic |
Removes a MAC address from a given string.
| [in] | str | The string containing a MAC address |
|
inlinestatic |
Replace a character with another inside text string.
| [in] | str | String to replace within |
| [in] | oldChar | Character to search for replacement |
| [in] | newChar | New character to use for replacement |
Example:
|
inlinestatic |
Replace a complete text with another inside text string.
| [in] | str | String to replace within |
| [in] | oldStr | String to search for replacement |
| [in] | newStr | New string to use for replacement |
Example:
|
inlinestatic |
Replace a complete text with another inside 16bit wide text string.
| [in] | str | String to replace within |
| [in] | oldStr | String to search for replacement |
| [in] | newStr | New string to use for replacement |
|
inlinestatic |
Combine all numerical digits and give it as integer value.
| [in,out] | str | String to check for digits |
|
inlinestatic |
Returns a string from end with givent count.
| [in] | str | String to use |
| [in] | count | Amount of characters to go from right |
Example:
|
inlinestatic |
Convert a string to lowercase.
| [in,out] | str | String to convert |
Example:
|
inlinestatic |
Convert a 16bit wide string to lowercase.
| [in,out] | str | String to convert |
|
inlinestatic |
Convert a string to uppercase.
| [in,out] | str | String to convert |
Example:
|
inlinestatic |
Convert a 16bit wide string to uppercase.
| [in,out] | str | String to convert |
|
inlinestatic |
Trim a string with remove of not wanted spaces at begin and end of string.
| [in,out] | str | String to trim, becomes also changed and given on return |
Example:
|
inlinestatic |
Trim a string with remove of not wanted characters at begin and end of string.
| [in,out] | str | String to trim, becomes also changed and given on return |
| [in] | chars | Characters to use for trim |
|
inlinestatic |
Trim a string with remove of not wanted spaces at begin of string.
| [in,out] | str | String to trim, becomes also changed and given on return |
Example:
|
inlinestatic |
Trim a string with remove of not wanted characters at begin of string.
| [in,out] | str | String to trim, becomes also changed and given on return |
| [in] | chars | Characters to use for trim |
|
inlinestatic |
Trim a string with remove of not wanted spaces at end of string.
| [in,out] | str | String to trim, becomes also changed and given on return |
Example:
|
inlinestatic |
Trim a string with remove of not wanted characters at end of string.
| [in,out] | str | String to trim, becomes also changed and given on return |
| [in] | chars | Characters to use for trim |
|
inlinestatic |
Convert a word to a digit numerical string.
| [in] | str | String to convert |
Example: