![]() |
SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
|
#include <charconv>#include <concepts>#include <cstddef>#include <span>#include <string>#include <string_view>#include <vector>#include <sourcepp/Math.h>

Go to the source code of this file.
Namespaces | |
| namespace | sourcepp |
| namespace | sourcepp::string |
Functions | |
| bool | sourcepp::string::isNewLine (char c) |
| If a char is a newline character. | |
| bool | sourcepp::string::isNewLine (std::string_view str) |
| If a string is entirely composed of newline characters. | |
| bool | sourcepp::string::isWhitespace (char c) |
| If a char is a whitespace character. | |
| bool | sourcepp::string::isWhitespace (std::string_view str) |
| If a string is entirely composed of whitespace characters. | |
| bool | sourcepp::string::isNumber (char c) |
| If a char is a numerical character (0-9). | |
| bool | sourcepp::string::isNumber (std::string_view str) |
| If a string is entirely composed of numerical characters (0-9). | |
| bool | sourcepp::string::isAlphaNumeric (char c) |
| If a char is a letter (a-z, A-Z) or a numerical character (0-9). | |
| bool | sourcepp::string::isAlphaNumeric (std::string_view str) |
| If a string is entirely composed of alphanumeric characters (a-z, A-Z, 0-9). | |
| bool | sourcepp::string::contains (std::string_view s, char c) |
| bool | sourcepp::string::matches (std::string_view in, std::string_view search, bool ignoreCase=false) |
| A very basic regex-like pattern checker for ASCII strings. | |
| bool | sourcepp::string::iequals (std::string_view s1, std::string_view s2) |
| void | sourcepp::string::ltrim (std::string &s) |
| std::string_view | sourcepp::string::ltrim (std::string_view s) |
| void | sourcepp::string::rtrim (std::string &s) |
| std::string_view | sourcepp::string::rtrim (std::string_view s) |
| void | sourcepp::string::trim (std::string &s) |
| std::string_view | sourcepp::string::trim (std::string_view s) |
| void | sourcepp::string::trimInternal (std::string &s) |
| std::string | sourcepp::string::trimInternal (std::string_view s) |
| void | sourcepp::string::ltrim (std::string &s, std::string_view chars) |
| std::string_view | sourcepp::string::ltrim (std::string_view s, std::string_view chars) |
| void | sourcepp::string::rtrim (std::string &s, std::string_view chars) |
| std::string_view | sourcepp::string::rtrim (std::string_view s, std::string_view chars) |
| void | sourcepp::string::trim (std::string &s, std::string_view chars) |
| std::string_view | sourcepp::string::trim (std::string_view s, std::string_view chars) |
| void | sourcepp::string::trimInternal (std::string &s, std::string_view chars) |
| std::string | sourcepp::string::trimInternal (std::string_view s, std::string_view chars) |
| std::vector< std::string > | sourcepp::string::split (std::string_view s, char delim) |
| void | sourcepp::string::toLower (std::string &input) |
| std::string | sourcepp::string::toLower (std::string_view input) |
| void | sourcepp::string::toUpper (std::string &input) |
| std::string | sourcepp::string::toUpper (std::string_view input) |
| std::string | sourcepp::string::createRandom (uint16_t length=32, std::string_view chars="0123456789_abcdefghijklmnopqrstuvwxyz-ABCDEFGHIJKLMNOPQRSTUVWXYZ") |
| std::string | sourcepp::string::generateUUIDv4 () |
| std::string | sourcepp::string::padNumber (int64_t number, int width) |
| void | sourcepp::string::normalizeSlashes (std::string &path, bool stripSlashPrefix=false, bool stripSlashSuffix=true) |
| void | sourcepp::string::denormalizeSlashes (std::string &path, bool stripSlashPrefix=false, bool stripSlashSuffix=true) |
| bool | sourcepp::string::toBool (std::string_view number, bool &out, int base=10) |
| bool | sourcepp::string::isBool (std::string_view number, int base=10) |
| bool | sourcepp::string::toInt (std::string_view number, std::integral auto &out, int base=10) |
| template<std::integral T> | |
| bool | sourcepp::string::isInt (std::string_view number, int base=10) |
| bool | sourcepp::string::toFloat (std::string_view number, std::floating_point auto &out) |
| template<std::floating_point T> | |
| bool | sourcepp::string::isFloat (std::string_view number) |
| std::vector< std::byte > | sourcepp::string::decodeHex (std::string_view hex) |
| std::string | sourcepp::string::encodeHex (std::span< const std::byte > hex) |