string
Library to interact with strings.
Types
std::string::NullString
std::string::NullString
A null-terminated ASCII string.
std::string::NullString16
std::string::NullString16
A null-terminated UTF-16 string.
std::string::NullStringBase
std::string::NullStringBase
Base type for null-terminated strings. Represents a string with its size determined by the first 0x00 byte found.
<DataType>
: The type of the characters.
std::string::SizedString
std::string::SizedString
A ASCII string with a prefixed size.
<SizeType>
: The type of the size field.
std::string::SizedString16
std::string::SizedString16
A UTF-16 string with a prefixed size.
<SizeType>
: The type of the size field.
std::string::SizedStringBase
std::string::SizedStringBase
Base type for sized strings. Represents a string with its size preceding it.
<SizeType>
: The type of the size field.<DataType>
: The type of the characters.
Functions
std::string::length
std::string::length
Gets the length of a string.
string
: The string to get the length of.return
: The length of the string.
std::string::at
std::string::at
Gets the character at a given index.
string
: The string to get the character from.index
: The index of the character to get.return
: The character at the given index.
std::string::substr
std::string::substr
Gets a substring of a string.
string
: The string to get the substring from.pos
: The position of the first character of the substring.count
: The number of characters to get.return
: The substring.
std::string::parse_int
std::string::parse_int
Converts a string to an integer.
string
: The string to convert.base
: The base of the number.return
: The integer.
std::string::parse_float
std::string::parse_float
Converts a string to a float.
string
: The string to convert.return
: The float.
std::string::to_string
std::string::to_string
Converts any type to a string.
x
: The value to convert.return
: The string.
std::string::starts_with
std::string::starts_with
Checks if a string starts with a given substring.
string
: The string to check.part
: The substring to check for.return
: True if the string starts with the substring, false otherwise.
std::string::ends_with
std::string::ends_with
Checks if a string ends with a given substring.
string
: The string to check.part
: The substring to check for.return
: True if the string ends with the substring, false otherwise.
std::string::contains
std::string::contains
Checks if a string contains a given substring.
string
: The string to check.part
: The substring to check for.return
: True if the string contains the substring, false otherwise.
std::string::reverse
std::string::reverse
Reverses a string.
string
: The string to reverse.return
: The reversed string.
std::string::to_upper
std::string::to_upper
Converts a string to upper case.
string
: The string to convert.return
: The converted string.
std::string::to_lower
std::string::to_lower
Converts a string to lower case.
string
: The string to convert.return
: The converted string.
std::string::replace
std::string::replace
Replaces all occurrences of a substring with another substring.
string
: The string to replace in.pattern
: The substring to replace.replace
: The substring to replace with.return
: The string with the replacements.
Last updated