|
libcppwrap
A collection of C++ wrappers for native APIs
|
Namespaces | |
| namespace | ipv6 |
Functions | |
| std::string | read_file_as_string (const char *path) |
| Reads the contents of a file as a string. More... | |
| std::string | read_file_as_string (const std::string &path) |
| Reads the contents of a file as a string. More... | |
| std::string | slurp (const char *path) |
| Reads the contents of a file as a string with trailing whitespace removed. More... | |
| std::string | slurp (const std::string &path) |
| Reads the contents of a file as a string with trailing whitespace removed. More... | |
| std::string | slurp (const std::filesystem::path &path) |
| Reads the contents of a file as a string with trailing whitespace removed. More... | |
| void | spew (const char *path, std::string_view str) |
| Writes a string to a file. More... | |
| void | spew (const std::string &path, std::string_view str) |
| Writes a string to a file. More... | |
| void | spew (const std::filesystem::path &path, std::string_view str) |
| Writes a string to a file. More... | |
| template<typename T > | |
| std::enable_if< std::is_integral_v< T > &&std::is_unsigned_v< T >, T >::type | number (const char *str, int base=10) |
| Parses a string as a numeric value with strict formatting and range checks. More... | |
| template<typename T > | |
| std::enable_if< std::is_integral_v< T > &&std::is_signed_v< T >, T >::type | number (const char *str, int base=10) |
| Parses a string as a numeric value with strict formatting and range checks. More... | |
| template<typename T > | |
| std::enable_if< std::is_floating_point_v< T >, T >::type | number (const char *str) |
| Parses a string as a numeric value with strict formatting and range checks. More... | |
| template<typename T > | |
| std::enable_if< std::is_integral_v< T >, T >::type | number (const std::string &str, int base=10) |
| Parses a string as a numeric value with strict formatting and range checks. More... | |
| template<typename T > | |
| std::enable_if< std::is_floating_point_v< T >, T >::type | number (const std::string &str) |
| Parses a string as a numeric value with strict formatting and range checks. More... | |
| static std::string & | rtrim (std::string &str) noexcept |
| Removes trailing whitespace from a string in-place. More... | |
| std::enable_if< std::is_floating_point_v< T >, T >::type wx::number | ( | const char * | str | ) |
Parses a string as a numeric value with strict formatting and range checks.
| T | The numeric type to convert to. |
| str | The string to convert. |
| std::range_error | The string is valid but the number is out of range. |
| std::runtime_error | The string is invalid. |
| std::enable_if< std::is_integral_v< T > &&std::is_unsigned_v< T >, T >::type wx::number | ( | const char * | str, |
| int | base = 10 |
||
| ) |
Parses a string as a numeric value with strict formatting and range checks.
| T | The numeric type to convert to. |
| str | The string to convert. |
| base | The numeric base. |
| std::range_error | The string is valid but the number is out of range. |
| std::runtime_error | The string is invalid. |
| std::enable_if< std::is_integral_v< T > &&std::is_signed_v< T >, T >::type wx::number | ( | const char * | str, |
| int | base = 10 |
||
| ) |
Parses a string as a numeric value with strict formatting and range checks.
| T | The numeric type to convert to. |
| str | The string to convert. |
| base | The numeric base. |
| std::range_error | The string is valid but the number is out of range. |
| std::runtime_error | The string is invalid. |
| std::enable_if< std::is_floating_point_v< T >, T >::type wx::number | ( | const std::string & | str | ) |
Parses a string as a numeric value with strict formatting and range checks.
| T | The numeric type to convert to. |
| str | The string to convert. |
| std::range_error | The string is valid but the number is out of range. |
| std::runtime_error | The string is invalid. |
| std::enable_if< std::is_integral_v< T >, T >::type wx::number | ( | const std::string & | str, |
| int | base = 10 |
||
| ) |
Parses a string as a numeric value with strict formatting and range checks.
| T | The numeric type to convert to. |
| str | The string to convert. |
| base | The numeric base. |
| std::range_error | The string is valid but the number is out of range. |
| std::runtime_error | The string is invalid. |
| std::string wx::read_file_as_string | ( | const char * | path | ) |
Reads the contents of a file as a string.
sysfs entries and pipes.| path | The path of the file to read. |
| std::ios_base::failure | The file cannot be opened or a read error occurred. |
|
inline |
Reads the contents of a file as a string.
sysfs entries and pipes.| path | The path of the file to read. |
| std::ios_base::failure | The file cannot be opened or a read error occurred. |
|
inlinestaticnoexcept |
Removes trailing whitespace from a string in-place.
| str | The string from which to remove trailing whitespace. |
str. | std::string wx::slurp | ( | const char * | path | ) |
Reads the contents of a file as a string with trailing whitespace removed.
| path | The path of the file to read. |
| std::ios_base::failure | The file cannot be opened or a read error occurred. |
|
inline |
Reads the contents of a file as a string with trailing whitespace removed.
| path | The path of the file to read. |
| std::ios_base::failure | The file cannot be opened or a read error occurred. |
|
inline |
Reads the contents of a file as a string with trailing whitespace removed.
| path | The path of the file to read. |
| std::ios_base::failure | The file cannot be opened or a read error occurred. |
| void wx::spew | ( | const char * | path, |
| std::string_view | str | ||
| ) |
Writes a string to a file.
| path | The path of the file to write. |
| str | The string to write. |
| std::ios_base::failure | The file cannot be opened or a write error occurred. |
|
inline |
Writes a string to a file.
| path | The path of the file to write. |
| str | The string to write. |
| std::ios_base::failure | The file cannot be opened or a write error occurred. |
|
inline |
Writes a string to a file.
| path | The path of the file to write. |
| str | The string to write. |
| std::ios_base::failure | The file cannot be opened or a write error occurred. |