|
philsupertramp/game-math
|
#include <cstdarg>#include <regex>#include <sstream>#include <string>#include <vector>Go to the source code of this file.
Functions | |
| std::string | format (const char *fmt,...) |
| std::string | strip (const std::string &in) |
| template<typename Out > | |
| void | split (const std::string &s, char delim, Out result) |
| std::vector< std::string > | split (const std::string &s, char delim) |
| template<typename Out > | |
| void | split (const std::string &s, Out result) |
| std::vector< std::string > | split (const std::string &s) |
| std::vector< std::string > | split_by_regex (const std::string &s, const std::regex ®ex) |
Missing string manipulations.
This header file contains essential methods to manipulate strings.
missing string printf this is safe and convenient but not exactly efficient
| fmt | string to be formatted |
| ... | variable amount of parameters |
| std::vector< std::string > split | ( | const std::string & | s | ) |
Helper method to simplify call to split
| s | string to split |
Helper method to simplify call to split
| s | string to split |
| delim | character to split by |
splits s into result by delim
| Out |
| s | |
| delim | |
| result |
Split after each character
| Out | container type to write to |
| s | string to split |
| result | container to write results in |
| std::string strip | ( | const std::string & | in | ) |
Strips whitespaces of a string
| in | string which may contain whitespaces |