|
XJ music engine
1.9.6
In-game runtime engine for XJ music.
|
#include <StringUtils.h>
Static Public Member Functions | |
| static std::vector< std::string > | split (const std::string &input, const char delimiter) |
| static std::string | join (const std::vector< std::string > &input, const std::string &delimiter) |
| static std::string | trim (const std::string &str) |
| static std::string | toMeme (const std::string &raw) |
| static std::string | toMeme (const std::string *raw, const std::string &defaultValue) |
| static std::string | toEvent (const std::string &raw) |
| static bool | isNullOrEmpty (const std::string *raw) |
| static std::string | toAlphabetical (const std::string &raw) |
| static std::string | toAlphanumeric (const std::string &raw) |
| static std::string | toUpperCase (const std::string &input) |
| static std::string | toLowerCase (const std::string &input) |
| static std::string | formatFloat (float value) |
| static std::string | stripExtraSpaces (const std::string &value) |
| static std::optional< std::string > | match (const std::regex &pattern, const std::string &text) |
| static int | countMatches (const std::regex ®ex, const std::string &basicString) |
| static int | countMatches (const char regex, const std::string &basicString) |
| static std::string | toShipKey (const std::string &name) |
| static std::string | toLowerScored (const std::string &raw) |
| static std::string | toUpperScored (const std::string &raw) |
| static std::string | toScored (const std::string &raw) |
| static std::string | toProper (std::string raw) |
| static std::string | toProperSlug (const std::string &raw) |
| static std::string | toSlug (std::string raw) |
| static std::string | toLowerSlug (const std::string &raw) |
| static std::string | toUpperSlug (const std::string &raw) |
| static std::vector< std::string > | sort (const std::set< std::string > &items) |
| static std::string | zeroPadded (unsigned long long value, int digits) |
|
static |
Count the matches of a character in a string
| regex | to use |
| basicString | to search |
|
static |
Count the matches of a regex in a string
| regex | to use |
| basicString | to search |
|
static |
Format a float as a string with the minimum required number of digits after the floating point (minimum of 1 digit)
| value | The float to format |
|
static |
Check if a string is null or empty
| raw | The string to check |
|
static |
Join a vector of strings with a delimiter
| input | The vector of strings |
| delimiter | The delimiter |
|
static |
First group matching pattern in text, else null
| pattern | to use |
| text | to search |
|
static |
Sort a set of strings into an ordered vector
| items | set of strings |
|
static |
Split a string by a delimiter
| input | The string to split |
| delimiter | The delimiter |
|
static |
Replace more than one space with one space, and strip leading and trailing spaces
| value | to strip |
|
static |
Remove all non-alphabetical characters from a string
| raw | The string to clean |
|
static |
Remove all non-alphanumeric characters from a string
| raw | The string to clean |
|
static |
Conform to Upper-slug non-numeric and strip special characters, e.g. "BUN"
| raw | input |
|
static |
Convert a string to lowercase
| input | The string to convert |
|
static |
Conform to Lower-scored (e.g. "buns_and_jams")
| raw | input |
|
static |
Conform to Lowercase slug (e.g. "mush")
| raw | input |
|
static |
Conform to Upper-slug including some special characters, e.g. "BUN!"
| raw | input |
|
static |
Conform to Upper-slug (e.g. "BUN"), else default value
| raw | input |
| defaultValue | if no input |
|
static |
Conform to Proper (e.g. "Jam")
| raw | input |
|
static |
Conform to Proper-slug (e.g. "Jam")
| raw | input |
|
static |
Conform to toScored (e.g. "mush_bun")
| raw | input |
|
static |
Convert a string to a ship key
| name | The name to convert |
|
static |
Conform to Slug (e.g. "jim")
| raw | input |
|
static |
Convert a string to uppercase
| input | The string to convert |
|
static |
Conform to Upper-scored (e.g. "BUNS_AND_JAMS")
| raw | input |
|
static |
Conform to Uppercase slug (e.g. "MUSH")
| raw | input |
|
static |
Function to trim whitespace from the start and end of a string
| str | The string to trim |
|
inlinestatic |
Pad the value with zeros to the given number of digits
| value | to pad |
| digits | total after padding |