KSS Utility
C++ general utilities
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
stringutil.hpp File Reference

Miscellaneous algorithms related to strings. More...

#include <string>

Go to the source code of this file.

Namespaces

 kss
 All Klassen Software Solutions libraries begin with this namespace.
 
 kss::util
 General utility methods that don't fit into any of the other categories.
 
 kss::util::strings
 Items related to string handling.
 

Functions

std::string kss::util::strings::format (std::string pattern,...)
 
std::string kss::util::strings::vformat (const std::string &pattern, va_list ap)
 
std::string & kss::util::strings::ltrim (std::string &s) noexcept
 
std::string & kss::util::strings::ltrim (std::string &s, char c) noexcept
 
std::string & kss::util::strings::rtrim (std::string &s) noexcept
 
std::string & kss::util::strings::rtrim (std::string &s, char c) noexcept
 
std::string & kss::util::strings::trim (std::string &s) noexcept
 
std::string & kss::util::strings::trim (std::string &s, char c) noexcept
 
bool kss::util::strings::startsWith (const std::string &str, const std::string &prefix) noexcept
 
bool kss::util::strings::endsWith (const std::string &str, const std::string &suffix) noexcept
 
std::string & kss::util::strings::toUpper (std::string &s) noexcept
 
std::string kss::util::strings::toUpper (const std::string &s)
 
std::wstring & kss::util::strings::toUpper (std::wstring &s) noexcept
 
std::wstring kss::util::strings::toUpper (const std::wstring &s)
 
std::string & kss::util::strings::toLower (std::string &s) noexcept
 
std::string kss::util::strings::toLower (const std::string &s)
 
std::wstring & kss::util::strings::toLower (std::wstring &s) noexcept
 
std::wstring kss::util::strings::toLower (const std::wstring &s)
 
bool kss::util::strings::iequal (const std::string &a, const std::string &b) noexcept
 
bool kss::util::strings::iequal (const std::wstring &a, const std::wstring &b) noexcept
 
int kss::util::strings::icompare (const std::string &a, const std::string &b) noexcept
 
int kss::util::strings::icompare (const std::wstring &a, const std::wstring &b) noexcept
 
template<class Char , class traits = std::char_traits<Char>, class Alloc = std::allocator<Char>>
unsigned kss::util::strings::countOccurrencesOf (const std::basic_string< Char, traits, Alloc > &source, const std::basic_string< Char, traits, Alloc > &substr, bool allowOverlaps=false) noexcept
 
template<class Char , class Traits = std::char_traits<Char>, class Alloc = std::allocator<Char>>
unsigned kss::util::strings::countOccurrencesOf (const std::basic_string< Char, Traits, Alloc > &source, const Char *substr, bool allowOverlaps=false) noexcept
 

Detailed Description

Miscellaneous algorithms related to strings.

Definition in file stringutil.hpp.