String manipulation functions.
More...
|
static std::vector< float > | toFloatArray (const std::string &str) |
| Converts a comma delimited string of floats into an array.
|
|
static void | removeChar (std::string &line, const char c) |
| Remove all isntances of c from line.
|
|
static std::vector< std::string > | tokenize (const std::string &str, char delim, bool keepEmpty=false) |
| Splits a string with a given token and returns a vector of results.
|
|
static std::string | toLower (const std::string &str) |
| Converts a string to all lower case.
|
|
static std::uint32_t | toHostOrderIPv4 (const std::string &str) |
| Converts a string representation of an IPv4 address to a 32bit uint in host byte order ie 127.0.0.1 == 0x7f000001.
|
|
static std::string | fromHostOrderIPv4 (std::uint32_t bytes) |
| Converts a 32bit IPv4 address to its string representation. More...
|
|
static std::uint32_t | toNetworkOrderIPv4 (const std::string &str) |
| Converts a string representation of an IPv4 address to a 32bit uint in network byte order ie 127.0.0.1 == 0x0100007f.
|
|
static std::string | fromNetworkOrderIPv4 (std::uint32_t bytes) |
| Converts a 32bit IPv4 address to its string representation. More...
|
|
static std::vector< uint32_t > | getCodepoints (const std::string &str) |
| Decode a UTF8 encoded string to a vector of uint32 codepoints. Donated by therocode https://github.com/therocode.
|
|
String manipulation functions.
◆ fromHostOrderIPv4()
static std::string xy::Util::String::fromHostOrderIPv4 |
( |
std::uint32_t |
bytes | ) |
|
|
inlinestatic |
Converts a 32bit IPv4 address to its string representation.
- Parameters
-
bytes | Uint32 value containing the ip address bytes in host byte order ie 127.0.0.1 == 0x7f000001 |
◆ fromNetworkOrderIPv4()
static std::string xy::Util::String::fromNetworkOrderIPv4 |
( |
std::uint32_t |
bytes | ) |
|
|
inlinestatic |
Converts a 32bit IPv4 address to its string representation.
- Parameters
-
bytes | Uint32 value containing the ip address bytes in network byte order ie 127.0.0.1 == 0x0100007f |