|
KittyMemoryEx 1.0.0
Dedicated library for runtime code patching, memory scanning, tracing, injection and some more useful memory utilities. works for both Android and Linux
|
Provides utility functions for strings. More...
Functions | |
| bool | charEqualsIgnoreCase (char a, char b) |
| Helper to compare two characters case-insensitively. | |
| bool | startsWith (const std::string &str, const std::string &prefix, bool sensitive=true) |
| Checks if a string starts with a given prefix. | |
| bool | startsWith (const std::string &str, const std::vector< std::string > &prefixes, bool sensitive=true) |
| Checks if a string starts with any of the given prefixes. | |
| bool | contains (const std::string &str, const std::string &substring, bool sensitive=true) |
| Checks if a string contains a given substring. | |
| bool | contains (const std::string &str, const std::vector< std::string > &substrings, bool sensitive=true) |
| Checks if a string contains any of the given substrings. | |
| bool | endsWith (const std::string &str, const std::string &suffix, bool sensitive=true) |
| Checks if a string ends with a given suffix. | |
| bool | endsWith (const std::string &str, const std::vector< std::string > &suffixes, bool sensitive=true) |
| Checks if a string ends with any of the given suffixes. | |
| void | trim (std::string &str) |
| Trims whitespace from the beginning and end of a string. | |
| void | removeAllWhitespace (std::string &str) |
| Removes all whitespace characters from a string, not just leading/trailing. | |
| bool | isValidHex (const std::string &hex) |
| Checks if the provided string is a valid hexadecimal representation. | |
| bool | validateHex (std::string &hex) |
| Validates a hexadecimal string. | |
| std::string | fmt (const char *fmt,...) |
| Formats a string using a printf-style format. | |
Provides utility functions for strings.
| bool KittyUtils::String::contains | ( | const std::string & | str, |
| const std::string & | substring, | ||
| bool | sensitive = true ) |
Checks if a string contains a given substring.
| str | The string to check. |
| substring | The substring to look for. |
| sensitive | Whether the comparison should be case-sensitive (default is true). |
| bool KittyUtils::String::contains | ( | const std::string & | str, |
| const std::vector< std::string > & | substrings, | ||
| bool | sensitive = true ) |
Checks if a string contains any of the given substrings.
| str | The string to check. |
| substrings | A list of substrings to look for. |
| sensitive | Whether the comparison should be case-sensitive (default is true). |
| bool KittyUtils::String::endsWith | ( | const std::string & | str, |
| const std::string & | suffix, | ||
| bool | sensitive = true ) |
Checks if a string ends with a given suffix.
| str | The string to check. |
| suffix | The suffix to look for. |
| sensitive | Whether the comparison should be case-sensitive (default is true). |
| bool KittyUtils::String::endsWith | ( | const std::string & | str, |
| const std::vector< std::string > & | suffixes, | ||
| bool | sensitive = true ) |
Checks if a string ends with any of the given suffixes.
| str | The string to check. |
| suffixes | A list of suffixes to look for. |
| sensitive | Whether the comparison should be case-sensitive (default is true). |
| std::string KittyUtils::String::fmt | ( | const char * | fmt, |
| ... ) |
Formats a string using a printf-style format.
| fmt | The format string. |
| ... | Variable arguments to be formatted. |


| bool KittyUtils::String::isValidHex | ( | const std::string & | hex | ) |
Checks if the provided string is a valid hexadecimal representation.
This function validates if the given string is a valid hexadecimal number. A valid hexadecimal number can contain characters '0'-'9' and 'A-F' or 'a-f'.
| hex | The string to validate as a hexadecimal number. |
| void KittyUtils::String::removeAllWhitespace | ( | std::string & | str | ) |
Removes all whitespace characters from a string, not just leading/trailing.
| str | The string to strip whitespace from. |
| bool KittyUtils::String::startsWith | ( | const std::string & | str, |
| const std::string & | prefix, | ||
| bool | sensitive = true ) |
Checks if a string starts with a given prefix.
| str | The string to check. |
| prefix | The prefix to look for. |
| sensitive | Whether the comparison should be case-sensitive (default is true). |
| bool KittyUtils::String::startsWith | ( | const std::string & | str, |
| const std::vector< std::string > & | prefixes, | ||
| bool | sensitive = true ) |
Checks if a string starts with any of the given prefixes.
| str | The string to check. |
| prefixes | A list of prefixes to look for. |
| sensitive | Whether the comparison should be case-sensitive (default is true). |
| void KittyUtils::String::trim | ( | std::string & | str | ) |
Trims whitespace from the beginning and end of a string.
| str | The string to be trimmed. |
| bool KittyUtils::String::validateHex | ( | std::string & | hex | ) |
Validates a hexadecimal string.
| hex | The hexadecimal string to validate. |