63 "Expecting a floating point value in StrListtoFlist(): got " 78 if (!s(p).matches(
RXint))
81 "Expecting a integer value in StrListtoIList(): got " 133 if(ts.
open(filename) != 0){
134 cerr <<
"Can't open EST_StrList file " << filename << endl;
156 outf =
new ofstream(filename);
161 if (style ==
"words")
163 for (p = l.
head(); p; p = p->
next())
172 else if (style ==
"lines")
173 for (p = l.
head(); p; p = p->
next())
174 *outf << l(p) << endl;
177 cerr <<
"Unknown style for writing StrLists: " << style << endl;
189 for (p = l.
head(); p != 0; p = p->
next())
200 for (p = l.
head(); p != 0; p = p->
next())
219 for (p = l.
head(),i=0; p != 0; p = p->
next(),i++)
228 for (i=0;i<v.
length();i++)
void set_WhiteSpaceChars(const EST_String &ws)
set which characters are to be treated as whitespace
EST_TokenStream & get(EST_Token &t)
get next token in stream
void StrList_to_StrVector(EST_StrList &l, EST_StrVector &v)
Convert a list of strings to a vector of strings.
EST_write_status save_StrList(EST_String filename, EST_StrList &l, EST_String style)
Save tokens from a EST_StrList. If style is set to "lines" each item is stored on a separate line...
int StrListtoIList(EST_StrList &s, EST_IList &il)
Convert a list of strings to a list of integers.
void set_SingleCharSymbols(const EST_String &sc)
set which characters are to be treated as single character symbols
void BracketStringtoStrList(EST_String s, EST_StrList &l, EST_String sep)
Convert a EST_String enclosed in a single set of brackets to a EST_StrList by separating tokens in s ...
void close(void)
Close stream.
EST_Regex RXdouble("-?\\(\\([0-9]+\\.[0-9]*\\)\\|\\([0-9]+\\)\\|\\(\\.[0-9]+\\)\\)\\([eE][---+]?[0-9]+\\)?")
Floating point number.
int open(const EST_String &filename)
open a EST_TokenStream for a file.
int open_string(const EST_String &newbuffer)
open a EST_TokenStream for string rather than a file
EST_Regex RXint("-?[0-9]+")
Integer.
void set_PunctuationSymbols(const EST_String &ps)
set which characters are to be treated as (post) punctuation
void resize(ssize_t n, int set=1)
void StrListtoString(EST_StrList &l, EST_String &s, EST_String sep)
int gsub(const char *os, const EST_String &s)
Substitute one string for another.
INLINE ssize_t length() const
number of items in vector.
void StringtoStrList(EST_String s, EST_StrList &l, EST_String sep)
Convert a EST_String to a EST_StrList by separating tokens in s delimited by the separator sep...
The file was written successfully.
void StrVector_to_StrList(EST_StrVector &v, EST_StrList &l)
Convert a vector of strings to a list of strings.
The file was not written successfully.
void append(const T &item)
add item onto end of list
int strlist_member(const EST_StrList &l, const EST_String &s)
Return true if s is in list l.
T & item(const EST_Litem *p)
long int strlist_index(const EST_StrList &l, const EST_String &s)
Search the vector and return the position of the first occurance of string s in the list...
long int StrVector_index(const EST_StrVector &v, const EST_String &s)
Search the vector and return the position of the first occurance of string s in the vector...
int StrListtoFList(EST_StrList &s, EST_FList &f)
Convert a list of strings to a list of floats.
EST_read_status load_StrList(EST_String filename, EST_StrList &l)
Load tokens from a file and return them in a EST_StrList.
void clear(void)
remove all items in list
Utility EST_String Functions header file.