41#ifndef UFO_UTILITY_STRING_HPP
42#define UFO_UTILITY_STRING_HPP
57[[nodiscard]] std::vector<std::string>
split(std::string
const& s,
char delimiter);
65[[nodiscard]] std::string
join(std::vector<std::string>
const& strings,
char delimiter);
73[[nodiscard]]
bool startsWith(std::string
const& s, std::string
const& prefix);
81[[nodiscard]]
bool endsWith(std::string
const& s, std::string
const& suffix);
89[[nodiscard]]
bool contains(std::string
const& s, std::string
const& sub);
96[[nodiscard]] std::string
tolower(std::string s);
103[[nodiscard]] std::string
toupper(std::string s);
109void ltrim(std::string& s);
115void rtrim(std::string& s);
121void trim(std::string& s);
128[[nodiscard]] std::string
ltrimCopy(std::string s);
135[[nodiscard]] std::string
rtrimCopy(std::string s);
142[[nodiscard]] std::string
trimCopy(std::string s);
All vision-related classes and functions.
std::vector< std::string > split(std::string const &s, char delimiter)
Splits a string into a vector of substrings using a delimiter.
void ltrim(std::string &s)
Removes leading whitespace from the string (in-place).
bool startsWith(std::string const &s, std::string const &prefix)
Checks if a string starts with a given prefix.
bool endsWith(std::string const &s, std::string const &suffix)
Checks if a string ends with a given suffix.
void rtrim(std::string &s)
Removes trailing whitespace from the string (in-place).
std::string toupper(std::string s)
Converts all characters in the string to uppercase.
std::string join(std::vector< std::string > const &strings, char delimiter)
Joins a vector of strings into a single string with a delimiter.
std::string ltrimCopy(std::string s)
Returns a copy of the string with leading whitespace removed.
std::string tolower(std::string s)
Converts all characters in the string to lowercase.
std::string trimCopy(std::string s)
Returns a copy of the string with leading and trailing whitespace removed.
std::string rtrimCopy(std::string s)
Returns a copy of the string with trailing whitespace removed.
constexpr bool contains(A const &a, B const &b)
Checks if a shape contains another shape.
void trim(std::string &s)
Removes leading and trailing whitespace from the string (in-place).