46 #include "EST_types.h"
47 #include "EST_String.h"
48 #include "EST_Pathname.h"
49 #include "EST_string_aux.h"
50 #include "EST_cutils.h"
51 #include "EST_Token.h"
57 for (p = s.head(); p; p = p->next())
58 if (!s(p).matches(RXdouble))
61 "Expecting a floating point value in StrListtoFlist(): got "
75 for (p = s.head(); p; p = p->next())
76 if (!s(p).matches(RXint))
79 "Expecting a integer value in StrListtoIList(): got "
95 StringtoStrList(s, l, sep);
122 for (
EST_Litem *p = l.head(); p; p = p->next())
131 if(ts.
open(filename) != 0){
132 cerr <<
"Can't open EST_StrList file " << filename << endl;
133 return misc_read_error;
154 outf =
new ofstream(filename);
159 if (style ==
"words")
161 for (p = l.head(); p; p = p->next())
170 else if (style ==
"lines")
171 for (p = l.head(); p; p = p->next())
172 *outf << l(p) << endl;
175 cerr <<
"Unknown style for writing StrLists: " << style << endl;
176 return misc_write_error;
187 for (p = l.head(); p != 0; p = p->next())
198 for (p = l.head(); p != 0; p = p->next())
217 for (p = l.head(),i=0; p != 0; p = p->next(),i++)
226 for (i=0;i<v.
length();i++)
int gsub(const char *os, const EST_String &s)
Substitute one string for another.
T & item(const EST_Litem *p)
void clear(void)
remove all items in list
void append(const T &item)
add item onto end of list
void resize(int n, int set=1)
INLINE int length() const
number of items in vector.
void set_SingleCharSymbols(const EST_String &sc)
set which characters are to be treated as single character symbols
int open_string(const EST_String &newbuffer)
open a \Ref{EST_TokenStream} for string rather than a file
void set_PunctuationSymbols(const EST_String &ps)
set which characters are to be treated as (post) punctuation
void close(void)
Close stream.
int open(const EST_String &filename)
open a \Ref{EST_TokenStream} for a file.
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