|
Public Member Functions |
| slip (const slip &s) |
| slip (const char *s) |
| slip (const char *s, int n) |
| slip (const char c) |
| slip (const substring &sb) |
slip & | operator= (const char *s) |
| Assignment operator from const char.
|
slip & | operator= (const slip &s) |
| Copy assignment.
|
slip & | operator= (const substring &sb) |
| operator const char * () const |
| Casting operator to const char*.
|
| operator const std::string () const |
| Casting operator to std::string.
|
const char | operator[] (int n) const |
| Single character access.
|
int | length (void) const |
| Return the length of the string.
|
char | chop (void) |
| Erase the last character.
|
void | chomp (void) |
| Erase the last character if it is a white space character.
|
int | index (const slip &s, int offset=0) |
| Returns position of a string within a string.
|
int | rindex (const slip &s, int offset=-1) |
| Returns position of a string within a from the right string.
|
int | wsplit (llip &) |
| White space split.
|
int | strsplit (const slip &str, llip &sl) |
| Split a string on boundries of constant string.
|
substring | substr (int offset, int len=-1) |
| Return a substring of a string.
|
PLIS_INLINE substring | substr (const Range &r) |
int | tr (const char *, const char *, const char *opts="") |
| Like perl tr operator. Translates characters.
|
int | m (Regexp &r) |
int | m (const char *, const char *opts="") |
| Match a regular exppression string.
|
int | m (const char *, llip &match_list, const char *opts="") |
int | m (Regexp &r, llip &match_list) |
int | s (const char *, const char *, const char *opts="") |
| like perl/sed s/// operator for regexp substition
|
llip | split (const char *pat="[ \\t\\n]+", int limit=-1) |
int | operator< (const slip &s) const |
int | operator> (const slip &s) const |
int | operator<= (const slip &s) const |
int | operator>= (const slip &s) const |
int | operator== (const slip &s) const |
int | operator== (const char *s) const |
int | operator!= (const slip &s) const |
int | operator!= (const char *s) const |
slip | operator+ (const slip &s) const |
| Concatination operator with another slip.
|
slip | operator+ (const char *s) const |
| Concatination operator with a const char *.
|
slip | operator+ (char c) const |
| Concatination operator with a char.
|
slip & | operator+= (const slip &s) |
| Inline concatination with a slip.
|
slip & | operator+= (const char *s) |
| Inline concatination with a const char*.
|
slip & | operator+= (char c) |
| Inline concatination with a char.
|
const std::string & | str () const |
| Return the underlying std::string string.
|
const char * | c_str () const |
| Compatibility function with string.
|
int | atoi () |
| A wrapper for the atoi() function.
|
double | atof () |
| A wrapper for the atof() function.
|
Friends |
class | substring |
slip | operator+ (const char *s1, const slip &s2) |
| Contationation operator.
|
std::istream & | operator>> (std::istream &, slip &) |
| Output to a stream.
|
The regular expression engine used is the PCRE library, which has been wrapped in the Regexp class.