![]() |
galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
|
Functions | |
std::vector< std::string > | split (std::string_view input, std::string_view delim) noexcept |
Split a string based on a delimiter. | |
void | replace_first (std::string &input, std::string_view to_replace, std::string_view replace_with) noexcept |
Replace first occurrence of a string. | |
void | replace_all (std::string &input, std::string_view to_replace, std::string_view replace_with) noexcept |
Replaces all occurrences of a string. | |
bool | begins_with (const std::string &input, const std::string &find) noexcept |
Check if string begins with another string. | |
void | ltrim (std::string &input) noexcept |
Trim string from end. | |
void | rtrim (std::string &input) noexcept |
Trim string from start. | |
void | trim (std::string &input) noexcept |
Trim both ends of string. | |
void | make_single_spaced (std::string &input) noexcept |
Make a string single spaced. | |
|
nodiscardnoexcept |
Split a string based on a delimiter.
input | Input string to process. |
delim | Delimiter to split string on. |
Definition at line 17 of file StringUtils.cpp.
|
noexcept |
Replace first occurrence of a string.
Returns input string if to_replace not found.
input | String to modify. |
to_replace | Substring to be replaced. |
replace_with | String to be inserted. |
Definition at line 37 of file StringUtils.cpp.
|
noexcept |
Replaces all occurrences of a string.
Returns input string if to_replace not found.
input | String to modify. |
to_replace | Substring to be replaced. |
replace_with | String to be inserted. |
Definition at line 47 of file StringUtils.cpp.
|
nodiscardnoexcept |
Check if string begins with another string.
input | Input string to check. |
find | String to check for at beginning of input string. |
Definition at line 62 of file StringUtils.cpp.
|
noexcept |
Trim string from end.
input | String to trim. |
Definition at line 67 of file StringUtils.cpp.
|
noexcept |
Trim string from start.
input | String to trim. |
Definition at line 75 of file StringUtils.cpp.
|
noexcept |
Trim both ends of string.
input | String to trim. |
Definition at line 83 of file StringUtils.cpp.
|
noexcept |
Make a string single spaced.
input | String to reduce spacing from. |
Definition at line 89 of file StringUtils.cpp.