ShlubluLib  v0.5
ShlubluLib is a lightweight, modular, general purpose, open-source C++ library for Linux and Windows.
Namespaces | Functions
String.h File Reference
#include <algorithm>
#include <iomanip>
#include <sstream>
#include <vector>

Go to the source code of this file.

Namespaces

 shlublu
 
 shlublu::String
 

Functions

template<typename T >
std::string shlublu::String::xtos (T arg)
 Converts arithmetic values or pointers to std::string. More...
 
template<typename T >
std::string shlublu::String::xtofs (T arg)
 Converts floating point values to std::string in fixed notation. More...
 
std::vector< std::string > const & shlublu::String::split (std::string const &s, char delim, std::vector< std::string > &elems)
 Splits a string delimited by a given character and stores the substrings in the given target vector. More...
 
std::vector< std::string > shlublu::String::split (std::string const &s, char delim)
 Splits a string delimited by a given character and returns the result as a vector of substrings. More...
 
std::string & shlublu::String::ltrim (std::string &s)
 Trims the leading blank characters of a string. More...
 
std::string & shlublu::String::rtrim (std::string &s)
 Trims the trailing blank characters of a string. More...
 
std::string & shlublu::String::trim (std::string &s)
 Trims the leading and trailing blank characters of a string. More...
 
std::string & shlublu::String::replace (std::string &source, std::string const &find, std::string const &replaceBy)
 Replaces all occurences of a substring in a string. More...
 
std::string & shlublu::String::lower (std::string &s)
 Converts a string to lowercase. More...
 
std::string shlublu::String::lower (std::string const &s)
 Returns a lowercase version of the given string. More...
 
std::string & shlublu::String::upper (std::string &s)
 Converts a string to uppercase. More...
 
std::string shlublu::String::upper (std::string const &s)
 Returns a uppercase version of the given string. More...
 
std::wstring shlublu::String::toWString (std::string const &str)
 Returns an UTF-8 wstring version of the given string. More...
 
std::string shlublu::String::fromWString (std::wstring const &wstr)
 Returns a string version of the given UTF-8 wstring. More...
 
size_t shlublu::String::levenshteinDistance (std::string const &s, std::string const &t)
 Computes the Levenshtein distance between two strings. More...
 

Detailed Description

Helper functions not included in std::string.

See String namespace documentation for details.