SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Loading...
Searching...
No Matches
String.h File Reference
#include <charconv>
#include <concepts>
#include <string>
#include <string_view>
#include <vector>
#include <sourcepp/Math.h>
Include dependency graph for String.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  sourcepp
 
namespace  sourcepp::string
 

Functions

bool sourcepp::string::contains (std::string_view s, char c)
 
bool sourcepp::string::matches (std::string_view in, std::string_view search)
 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::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)
 
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, char pad='0')
 
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)
 
std::from_chars_result sourcepp::string::toBool (std::string_view number, bool &out, int base=10)
 
std::from_chars_result sourcepp::string::toInt (std::string_view number, std::integral auto &out, int base=10)
 
std::from_chars_result sourcepp::string::toFloat (std::string_view number, std::floating_point auto &out)