#include <basix/string.hpp>
#include <basix/vector.hpp>
#include <string.h>
Go to the source code of this file.
Namespaces
Functions
- nat hash (const string &s)
- char * as_charp (const string &s)
- void free_charp (char *s)
- Free memory allocated within as_charp.
- string as_string (void *ptr)
- string as_string (int i)
- string as_string (unsigned int i)
- string as_string (long int i)
- string as_string (long unsigned int i)
- string as_string (long long int i)
- string as_string (long long unsigned int i)
- int as_int (const string &s)
- string as_string (float x)
- string as_string (double x)
- string as_string (long double x)
- double as_double (const string &s)
- template<typename C > void floating_to_string (const C &val, string &s, const char *fm)
- template<typename C > void string_to_floating (const string &s, C &val, const char *fm)
- STMPL void numeric_to_string (const float &x, string &s)
- STMPL void numeric_to_string (const double &x, string &s)
- STMPL void numeric_to_string (const long double &x, string &s)
- STMPL void string_to_numeric (const string &s, float &val)
- STMPL void string_to_numeric (const string &s, double &val)
- STMPL void string_to_numeric (const string &s, long double &val)
- bool operator< (const string &s, const string &t)
- bool operator<= (const string &s, const string &t)
- bool operator> (const string &s, const string &t)
- bool operator>= (const string &s, const string &t)
- bool starts (const string &s, const string &what)
- Tell if s starts with what.
- bool ends (const string &s, const string &what)
- Tell if s ends with what.
- string copy (const string &s)
- string operator* (const string &s1, const string &s2)
- static bool is_locase (register char c)
- static bool is_upcase (register char c)
- string upcase (const string &s)
- Replace locases by upcases.
- string locase (const string &s)
- Replace upcases by locases.
- string upcase_first (const string &s)
- Replace locase by upcase for first letter.
- string locase_first (const string &s)
- Replace upcase by locase for first letter.
- string escape (const string &s)
- Replace "\n", "\t", and "\b" respectively by "\\n", "\\t", and "\\b".
- string unescape (const string &s)
- Replace "\\n", "\\t", and "\\b" respectively by "\n", "\t", and "\b".
- string quote (const string &s)
- Add " around s.
- string unquote (const string &s)
- Remove all the "..." and /"..."/ around s.
- static bool reads (const string &s, nat pos, const string &what)
- string replace (const string &s, const string &what, const string &by)
- Replace all the occurences of what by in s.
- int search_forwards (const string &s, const string &what, const int &pos)
- Search first occurrence of @ in @ after @ or @-1@.
- int search_backwards (const string &s, const string &what, const int &pos)
- Search first occurrence of @ in @ before @ or @-1@.
- string reverse (const string &s)
- Reverse the order of the characters in s.
- vector< string > tokenize (const string &s, const string &sep, bool keep=false)
- Cut into pieces, using
as
a separator.
- string recompose (const vector< string > &v, const string &sep, bool last=true)
- Reconstruct string from pieces in using as a separator.
- string repeated (const string &s, nat n)
- nat get_indentation (const string &s)
- string add_indentation (const string &s, int delta)
Variables