class mstring : public string

mstring class provides basic parser methods as geting tokens, splitting, brackets processing an so on

Inheritance:


Public Classes

enum sep_flag
Separator flag sep_single or sep_multiple

Public Methods

mstring& assignd(double val, const char *format)
Assignment from double
mstring& assigni(int val, const char *format)
Assignment from int
mstring& atrim()
Trim left and right whitespaces
mstring& atrimc(char c)
Trim left and right the character c
mstring& atrims(const string &s)
Trim left and right all the characters in s
int compare(const string &str, size_type len = npos)
Compare two strings. The function is provided just for convinience and uniformity
friend int compare(const mstring &str1, const mstring &str2, size_type len = npos)
Compare two strings. The function is provided just for convinience and uniformity
friend int comparei(const mstring &str1, const mstring &str2, size_type len = npos)
Compare two strings ignoring case. The function is provided just for convinience and uniformity
int comparei(const string &str, size_type len = npos)
Compare two strings ignoring case. The function is provided just for convinience and uniformity
mstring& del_escaped(char escaped_symb)
Delete escaped symbols from the string
mstring& del_pair(char pair_symb)
Delete pair-symb from the string
mstring& ins_escaped(const string &chrset, char escaped_symb)
Insert escaped symbols into the string
mstring& ins_pair(const string &chrset, char pair_symb)
Insert pair-symb into the string
mstring& ltrim()
Trim left whitespaces
mstring& ltrimc(char c)
Trim left the character c
mstring& ltrims(const string &s)
Trim left all the characters in s
mstring()
Default Constructor
mstring(const string &str)
Copy Constructor
mstring(const char *str)
Constructor from char*
mstring& operator = (int val)
Assignment from int
operator double()
Conversion to double
operator int()
Conversion to int
mstring& quote(const string &q_start, const string &q_end)
Add quote symbols into the string
unsigned replace_all(const string &find_str, const string &repl_str)
Find and replace all the 'find_str' to 'repl_str'
mstring& rtrim()
Trim right whitespaces
mstring& rtrimc(char c)
Trim right the character c
mstring& rtrims(const string &s)
Trim right all the characters in s
mstring& tab2sp(unsigned tab_size = 8)
Convert all tabs to spaces
mstring& toleft(unsigned newlen, char fill = ' ', bool cut = false)
Left align to 'newlen' with filler 'fill'
mstring& toright(unsigned newlen, char fill = ' ', bool cut = false)
Right align to 'newlen' with filler 'fill'

Public

enum sep_flag
Separator flag sep_single or sep_multiple

Documentation

mstring class provides basic parser methods as geting tokens, splitting, brackets processing an so on
enum sep_flag
Separator flag sep_single or sep_multiple. sep_single - Single mode - each symbol is a single separator (1,2,,,3,4 will be "1" "2" "" "" "3" "4") sep_multiple - Multiple mode - all symbols are one separator (1,,2,,3,,4 will be "1" "2" "3" "4") sep_whole_str - Whole string is a single separator (1,,2,3,,4 will be "1" "2,3" "4")

mstring()
Default Constructor

mstring(const char *str)
Constructor from char*

mstring(const string &str)
Copy Constructor

mstring& assigni(int val, const char *format)
Assignment from int

mstring& assignd(double val, const char *format)
Assignment from double

mstring& operator = (int val)
Assignment from int

operator int()
Conversion to int

operator double()
Conversion to double

mstring& ltrims(const string &s)
Trim left all the characters in s

mstring& rtrims(const string &s)
Trim right all the characters in s

mstring& atrims(const string &s)
Trim left and right all the characters in s

mstring& ltrimc(char c)
Trim left the character c

mstring& rtrimc(char c)
Trim right the character c

mstring& atrimc(char c)
Trim left and right the character c

mstring& ltrim()
Trim left whitespaces

mstring& rtrim()
Trim right whitespaces

mstring& atrim()
Trim left and right whitespaces

mstring& toleft(unsigned newlen, char fill = ' ', bool cut = false)
Left align to 'newlen' with filler 'fill'

mstring& toright(unsigned newlen, char fill = ' ', bool cut = false)
Right align to 'newlen' with filler 'fill'

unsigned replace_all(const string &find_str, const string &repl_str)
Find and replace all the 'find_str' to 'repl_str'

mstring& tab2sp(unsigned tab_size = 8)
Convert all tabs to spaces

int compare(const string &str, size_type len = npos)
Compare two strings. The function is provided just for convinience and uniformity

int comparei(const string &str, size_type len = npos)
Compare two strings ignoring case. The function is provided just for convinience and uniformity

friend int compare(const mstring &str1, const mstring &str2, size_type len = npos)
Compare two strings. The function is provided just for convinience and uniformity

friend int comparei(const mstring &str1, const mstring &str2, size_type len = npos)
Compare two strings ignoring case. The function is provided just for convinience and uniformity

mstring& ins_pair(const string &chrset, char pair_symb)
Insert pair-symb into the string

mstring& del_pair(char pair_symb)
Delete pair-symb from the string

mstring& ins_escaped(const string &chrset, char escaped_symb)
Insert escaped symbols into the string

mstring& del_escaped(char escaped_symb)
Delete escaped symbols from the string

mstring& quote(const string &q_start, const string &q_end)
Add quote symbols into the string


This class has no child classes.

alphabetic index hierarchy of classes


generated by doc++