Defines | |
#define | _STRINGUTILDEFAULTPRINTERROR true |
default values for stringutilprinterror
| |
#define | _STRINGUTILDEFAULTTHROWEXCEPTION false |
defaultvalues for stringutilthrowexception
| |
#define | _STRINGUTILSTRDELIMITER '\"' |
default string delimiter char specification. More... | |
#define | _STRINGUTILSCAPECHAR '\\' |
default scape char specification. More... | |
#define | _STRINGUTILCOMMENTCHAR '#' |
default comment char specification. More... | |
#define | _STRINGUTILCOLUMNSEPARATOR '\t' |
default column separator. More... | |
#define | _STRINGUTILCNTRLMARK '^' |
specificator for cntrl char. More... | |
#define | _STRINGUTILHEXAMARK 'X' |
specificator for hexadecimal. More... | |
#define | _STRINGUTILCHARTABLE |
the spceial characters specification table. More... | |
Functions | |
bool | stringutilprinterror () |
print error message default value is _STRINGUTILDEFAULTPRINTERROR;
| |
bool | stringutilprinterror (bool status) |
bool | stringutilthrowexception () |
throw exception default value is _STRINGUTILDEFAULTTHROWEXCEPTION
| |
bool | stringutilthrowexception (bool status) |
bool | isextended (char c) |
bool | iswhite (char c) |
white char detection, used by string util and dataio. More... | |
char | tocntrl (char c) |
unsigned | stringcasefind (string const &s1, string const &s2, unsigned pos=0) |
case insensive version of string::find(). More... | |
unsigned | stringcasefind_last_of (string const &s1, string const &s2, unsigned pos=0) |
case insensive version of string::find_last_of() does not used by dataio. More... | |
string& | parsestring (string &s, char strdelimiter=_STRINGUTILSTRDELIMITER, char scapechar=_STRINGUTILSCAPECHAR) |
clear extra spaces and parse delimited string of s the sequence of iswhite() is replaced by single space, except inside of delimited string (inside delimiters, the sequence of two delimiters is assumed one delimiters). More... | |
vector<string>& | parsestring (vector< string > &strlist, char strdelimiter=_STRINGUTILSTRDELIMITER, char scapechar=_STRINGUTILSCAPECHAR) |
for each element of list, clear extra spaces and parse delimited string. More... | |
string& | reverseparsestring (string &s, char strdelimiter=_STRINGUTILSTRDELIMITER, char scapechar=_STRINGUTILSCAPECHAR) |
translate s to delimited string (is delimiter is found, substitute by double of one). More... | |
vector<string>& | reverseparsestring (vector< string > &strlist, char strdelimiter=_STRINGUTILSTRDELIMITER, char scapechar=_STRINGUTILSCAPECHAR) |
for each element of list, convert to delimited string. More... | |
unsigned | findstringdelimiterclose (string const &s, unsigned pos=0, char strdelimiter=_STRINGUTILSTRDELIMITER, char scapechar=_STRINGUTILSCAPECHAR) |
return the position of string delimiter to close, started in the position pos. case delimiter='\0', force that delimiter is s[pos] otherwise: if s[pos] is not delimiter, assume that first delimiter is to open, and start closer findding. return ~0U if not found. return s.size() if delimiter do not occur in the s (starting the pos) CAUTION: This routine will change in future in way to support C/C++ like cher specification. More... | |
bool | stringdelimiterbalanced (string const &s, char strdelimiter=_STRINGUTILSTRDELIMITER, char scapechar=_STRINGUTILSCAPECHAR, unsigned pos1=0, unsigned pos2=(~0U)) |
return true, if string delimiter is closed correctly between [pos1, pos2). More... | |
bool | needdelimiter (string const &s, char strdelimiter=_STRINGUTILSTRDELIMITER, char scapechar=_STRINGUTILSCAPECHAR) |
return true, if string delimiters is required if contain two adjacent iswhite() or string delimiters. More... | |
istream& | gettextline (istream &f, string &line, char comment=_STRINGUTILCOMMENTCHAR, char strdelimiter=_STRINGUTILSTRDELIMITER, char scapechar=_STRINGUTILSCAPECHAR, char newlinedelimiter='\0') |
getline() that can read text file of ansi, DOS, windows (newline == '\r '), UNIX (newline=='n') and VAX/VMS (newline=='r') withouth specification. if (newline == '\0'), auto detect new line format. otherwise, work as getline() Unless (newline == EOF), assume end of file if EOF character is found or fisical eof occur It is necessary, because some text editor write EOF character at end of file If (newline == EOF), read EOF char into memory, if found. More... | |
istream& | getline (istream &f, vector< string > &dataline, char separator=_STRINGUTILCOLUMNSEPARATOR, char comment=_STRINGUTILCOMMENTCHAR, char strdelimiter=_STRINGUTILSTRDELIMITER, char scapechar=_STRINGUTILSCAPECHAR, char newline='\0') |
vectorized getline get vector <string> (one line separated as colmns) from istream does not used by dataio newline=='\0' is autodetect mode. More... | |
istream& | getlines (istream &f, vector< vector< string > > &datalist, char separator=_STRINGUTILCOLUMNSEPARATOR, char comment=_STRINGUTILCOMMENTCHAR, char strdelimiter=_STRINGUTILSTRDELIMITER, char scapechar=_STRINGUTILSCAPECHAR, char newline='\0') |
vectorized getlines newline=='\0' is auto detect mode. More... | |
ostream& | putline (ostream &f, vector< string > &dataline, char separator=_STRINGUTILCOLUMNSEPARATOR, char newline='\0') |
put the vector<string> to ostream dataio use it, only if _DATAIODEBUG_ is defined newline=='\0' is system newline. More... | |
ostream& | putlines (ostream &f, vector< vector< string > > &datalist, char separator=_STRINGUTILCOLUMNSEPARATOR, char newline='\0') |
vectorized putlines newline=='\0' is system new lines. More... | |
vector<vector <string> >& | transpose (vector< vector< string > > &data) |
transpose the vector<vector <string> > data array (replace row and column). More... |
|
Value: { \ \ \ \ {'a', '\a'}, \ {'b', '\b'}, \ {'e', '\e'}, \ {'f', '\f'}, \ {'n', '\n'}, \ {'r', '\r'}, \ {'t', '\t'}, \ {'v', '\v'}, \ {'\0', '\0'}, \ }
Definition at line 107 of file stringutil.h. |
|
specificator for cntrl char.
Definition at line 102 of file stringutil.h. |
|
default column separator.
Definition at line 100 of file stringutil.h. |
|
default comment char specification.
Definition at line 98 of file stringutil.h. |
|
default values for stringutilprinterror
Definition at line 88 of file stringutil.h. |
|
defaultvalues for stringutilthrowexception
Definition at line 91 of file stringutil.h. |
|
specificator for hexadecimal.
Definition at line 104 of file stringutil.h. |
|
default scape char specification.
Definition at line 96 of file stringutil.h. |
|
default string delimiter char specification.
Definition at line 94 of file stringutil.h. |
|
return the position of string delimiter to close, started in the position pos. case delimiter='\0', force that delimiter is s[pos] otherwise: if s[pos] is not delimiter, assume that first delimiter is to open, and start closer findding. return ~0U if not found. return s.size() if delimiter do not occur in the s (starting the pos) CAUTION: This routine will change in future in way to support C/C++ like cher specification.
|
|
vectorized getline get vector <string> (one line separated as colmns) from istream does not used by dataio newline=='\0' is autodetect mode.
|
|
vectorized getlines newline=='\0' is auto detect mode.
|
|
getline() that can read text file of ansi, DOS, windows (newline == '\r \\ |
|
Definition at line 141 of file stringutil.h. Referenced by iswhite().
|
|
white char detection, used by string util and dataio.
Definition at line 153 of file stringutil.h. |
|
return true, if string delimiters is required if contain two adjacent iswhite() or string delimiters.
|
|
for each element of list, clear extra spaces and parse delimited string.
Referenced by dataio::add(), dataio::addnamed(), dataio::commentclose(), dataio::commentline(), and dataio::linewrap().
|
|
clear extra spaces and parse delimited string of s the sequence of iswhite() is replaced by single space, except inside of delimited string (inside delimiters, the sequence of two delimiters is assumed one delimiters).
|
|
put the vector<string> to ostream dataio use it, only if _DATAIODEBUG_ is defined newline=='\0' is system newline.
|
|
vectorized putlines newline=='\0' is system new lines.
|
|
for each element of list, convert to delimited string.
|
|
translate s to delimited string (is delimiter is found, substitute by double of one).
|
|
case insensive version of string::find().
|
|
case insensive version of string::find_last_of() does not used by dataio.
|
|
return true, if string delimiter is closed correctly between [pos1, pos2).
|
|
|
|
print error message default value is _STRINGUTILDEFAULTPRINTERROR;
|
|
|
|
throw exception default value is _STRINGUTILDEFAULTTHROWEXCEPTION
|
|
Definition at line 158 of file stringutil.h. |
|
transpose the vector<vector <string> > data array (replace row and column).
|