String

String manipulation.

Classes

  • StringUtility Utility class for manipulating Strings.
  • THashedString — References a compile time string and calculates its hash at compile time.
  • SourceCodePosition — Represents a location (file, line, column) in source code that's being scanned or parsed.
  • SourceCode — Wraps a source code represented as a text string, and provides helpers for movement through the code characters and lines.
  • StringID — A string identifier that provides very fast comparisons to other string identifiers.
  • StringID::StringIDUtil — Helper class that performs string actions on both null terminated character arrays and standard strings.
  • UTF8 — Provides methods to converting between UTF-8 character encoding and other popular encodings.

Structs

  • StringHash Hash function that allows map lookups using String, StringView or const char*.

Enums

Free functions

ToWString

WString ToWString(const String &source)

Converts a narrow string to a wide string.

ToWString

WString ToWString(const char *source)

Converts a narrow string to a wide string.

ToWString

WString ToWString(float val, unsigned short precision = 6, unsigned short width = 0, char fill = ' ', std::ios::fmtflags flags = std::ios::fmtflags(0))

Converts a float to a string.

ToWString

WString ToWString(double val, unsigned short precision = 6, unsigned short width = 0, char fill = ' ', std::ios::fmtflags flags = std::ios::fmtflags(0))

Converts a double to a string.

ToWString

WString ToWString(const Radian &val, unsigned short precision = 6, unsigned short width = 0, char fill = ' ', std::ios::fmtflags flags = std::ios::fmtflags(0))

Converts a Radian to a string.

ToWString

WString ToWString(const Degree &val, unsigned short precision = 6, unsigned short width = 0, char fill = ' ', std::ios::fmtflags flags = std::ios::fmtflags(0))

Converts a Degree to a string.

ToWString

WString ToWString(int val, unsigned short width = 0, char fill = ' ', std::ios::fmtflags flags = std::ios::fmtflags(0))

Converts an int to a string.

ToWString

WString ToWString(unsigned int val, unsigned short width = 0, char fill = ' ', std::ios::fmtflags flags = std::ios::fmtflags(0))

Converts an unsigned int to a string.

ToWString

WString ToWString(i64 val, unsigned short width = 0, char fill = ' ', std::ios::fmtflags flags = std::ios::fmtflags(0))

Converts an 64bit integer to a string.

ToWString

WString ToWString(u64 val, unsigned short width = 0, char fill = ' ', std::ios::fmtflags flags = std::ios::fmtflags(0))

Converts an 64bit unsigned to a string.

ToWString

WString ToWString(char val, unsigned short width = 0, char fill = ' ', std::ios::fmtflags flags = std::ios::fmtflags(0))

Converts an narrow char unsigned to a string.

ToWString

WString ToWString(wchar_t val, unsigned short width = 0, char fill = ' ', std::ios::fmtflags flags = std::ios::fmtflags(0))

Converts an wide bit char unsigned to a string.

ToWString

WString ToWString(bool value, bool yesNo = false)

Converts a boolean to a string.

value
Value to convert.
yesNo
(optional) If set to true, result is "yes" or "no" instead of "true" or "false".

ToWString

WString ToWString(const Vector2 &val)

Converts a 2 dimensional vector to a string.

ToWString

WString ToWString(const Vector2I &val)

Converts a 2 dimensional integer vector to a string.

ToWString

WString ToWString(const Vector3 &val)

Converts a 3 dimensional vector to a string.

ToWString

WString ToWString(const Vector4 &val)

Converts a 4 dimensional vector to a string.

ToWString

WString ToWString(const Matrix3 &val)

Converts a 3x3 matrix to a string.

ToWString

WString ToWString(const Matrix4 &val)

Converts a 4x4 matrix to a string.

ToWString

WString ToWString(const Quaternion &val)

Converts a Quaternion to a string.

ToWString

WString ToWString(const Color &val)

Converts a color to a string.

ToWString

WString ToWString(const Vector<b3d::WString> &val)

Converts a vector of strings into a single string where the substrings are delimited by spaces.

ToString

String ToString(const WString &source)

Converts a wide string to a narrow string.

ToString

String ToString(const wchar_t *source)

Converts a wide string to a narrow string.

ToString

String ToString(float val, unsigned short precision = 6, unsigned short width = 0, char fill = ' ', std::ios::fmtflags flags = std::ios::fmtflags(0))

Converts a float to a string.

ToString

String ToString(double val, unsigned short precision = 6, unsigned short width = 0, char fill = ' ', std::ios::fmtflags flags = std::ios::fmtflags(0))

Converts a double to a string.

ToString

String ToString(const Radian &val, unsigned short precision = 6, unsigned short width = 0, char fill = ' ', std::ios::fmtflags flags = std::ios::fmtflags(0))

Converts a Radian to a string.

ToString

String ToString(const Degree &val, unsigned short precision = 6, unsigned short width = 0, char fill = ' ', std::ios::fmtflags flags = std::ios::fmtflags(0))

Converts a Degree to a string.

ToString

String ToString(int val, unsigned short width = 0, char fill = ' ', std::ios::fmtflags flags = std::ios::fmtflags(0))

Converts an int to a string.

ToString

String ToString(unsigned int val, unsigned short width = 0, char fill = ' ', std::ios::fmtflags flags = std::ios::fmtflags(0))

Converts an unsigned int to a string.

ToString

String ToString(long val, unsigned short width = 0, char fill = ' ', std::ios::fmtflags flags = std::ios::fmtflags(0))

Converts a long to a string.

ToString

String ToString(unsigned long val, unsigned short width = 0, char fill = ' ', std::ios::fmtflags flags = std::ios::fmtflags(0))

Converts an unsigned long to a string.

ToString

String ToString(i64 val, unsigned short width = 0, char fill = ' ', std::ios::fmtflags flags = std::ios::fmtflags(0))

Converts a 64bit int to a string.

ToString

String ToString(u64 val, unsigned short width = 0, char fill = ' ', std::ios::fmtflags flags = std::ios::fmtflags(0))

Converts an 64bit unsigned int to a string.

ToString

String ToString(bool value, bool yesNo = false)

Converts a boolean to a string.

value
true to value.
yesNo
(optional) If set to true, result is "yes" or "no" instead of "true" or "false".

ToString

String ToString(const Vector2 &val)

Converts a 2 dimensional vector to a string.

ToString

String ToString(const Vector2I &val)

Converts a 2 dimensional integer vector to a string.

ToString

String ToString(const Vector3 &val)

Converts a 3 dimensional vector to a string.

ToString

String ToString(const Vector4 &val)

Converts a 4 dimensional vector to a string.

ToString

String ToString(const Matrix3 &val)

Converts a 3x3 matrix to a string.

ToString

String ToString(const Matrix4 &val)

Converts a 4x4 matrix to a string.

ToString

String ToString(const Quaternion &val)

Converts a Quaternion to a string.

ToString

String ToString(const Color &val)

Converts a color to a string.

ToString

String ToString(const UUID &val)

Converts an UUID to a string.

ToString

String ToString(const Path &val)

Converts a path to a string.

ToString

String ToString(const LogVerbosity &val)

Converts a log verbosity to a string.

ToString

String ToString(std::time_t time, bool isUTC = false, bool useISO8601 = false, TimeToStringConversionType type = TimeToStringConversionType::Time)

Converts the std::time_t structure containing time data to the string.

time
Variable representing stored time
isUTC
Outputs the date and time in Coordinated Universal Time, otherwise in local time.
useISO8601
Outputs the date and time in ISO 8601 format, otherwise it uses a custom format.
type
Type of the conversion applied.

Returns: Converted time as a String.

ToString

String ToString(const Vector<b3d::String> &val)

Converts a vector of strings into a single string where the substrings are delimited by spaces.

ParseFloat

float ParseFloat(const String &val, float defaultValue = 0)

Converts a String to a float.

ParseI32

i32 ParseI32(const String &val, i32 defaultValue = 0)

Converts a String to a whole number.

ParseU32

u32 ParseU32(const String &val, u32 defaultValue = 0)

Converts a String to a whole number.

ParseI64

i64 ParseI64(const String &val, i64 defaultValue = 0)

Converts a String to a whole number.

ParseU64

u64 ParseU64(const String &val, u64 defaultValue = 0)

Converts a String to a whole number.

ParseBool

bool ParseBool(const String &val, bool defaultValue = 0)

Converts a String to a boolean.

IsNumber

bool IsNumber(const String &val)

Checks the String is a valid number value.

ParseFloat

float ParseFloat(const WString &val, float defaultValue = 0)

Converts a WString to a float.

ParseI32

i32 ParseI32(const WString &val, i32 defaultValue = 0)

Converts a WString to a whole number.

ParseU32

u32 ParseU32(const WString &val, u32 defaultValue = 0)

Converts a WString to a whole number.

ParseI64

i64 ParseI64(const WString &val, i64 defaultValue = 0)

Converts a WString to a whole number.

ParseU64

u64 ParseU64(const WString &val, u64 defaultValue = 0)

Converts a WString to a whole number.

ParseBool

bool ParseBool(const WString &val, bool defaultValue = 0)

Converts a WString to a boolean.

IsNumber

bool IsNumber(const WString &val)

Checks the WString is a valid number value.

Internal

Symbols intended for engine-internal use. Not part of the public API.

Classes

  • StringFormat — Helper class used for string formatting operations.

Structs

  • THashedString::ConstWrapper
  • StringID::InternalData — Internal data that is shared by all instances for a specific string.
  • StringID::InitStatics — Performs initialization of static members as soon as the library is loaded.
  • StringFormat::FormatParamRange Data structure used during string formatting.
  • StringFormat::ParamData — Structure that holds value of a parameter during string formatting.