#include <GString.h>
Public Methods | |
~SubString () | |
SubString & | operator= (const String &y) |
SubString & | operator= (const SubString &y) |
SubString & | operator= (const char *t) |
SubString & | operator= (char c) |
int | contains (char c) const |
int | contains (const String &y) const |
int | contains (const SubString &y) const |
int | contains (const char *t) const |
int | contains (const Regex &r) const |
int | matches (const Regex &r) const |
unsigned int | length () const |
int | empty () const |
const char * | chars () const |
int | OK () const |
Protected Methods | |
void | assign (const JString_t *, const char *, int=-1) |
SubString (String &x, int p, int l) | |
SubString (const SubString &x) | |
Protected Attributes | |
String & | S |
unsigned short | pos |
unsigned short | len |
Friends | |
class | String |
ostream & | operator<< (ostream &s, const SubString &x) |
|
|
|
|
|
Definition at line 493 of file GString.h. 00493 {} |
|
Definition at line 1300 of file GString.cc. 01301 { 01302 int v = S != (const char*)0; // have a String; 01303 v &= S.OK(); // that is legal 01304 v &= pos + len >= (short) S.rep->len;// pos and len within bounds 01305 if (!v) S.error("SubString invariant failure"); 01306 return v; 01307 } |
|
Referenced by operator=().
|
|
Definition at line 468 of file GString.h. Referenced by String::after(), String::at(), String::before(), cat(), compare(), contains(), String::contains(), String::del(), String::freq(), String::from(), String::gsub(), String::index(), matches(), String::matches(), operator<<(), operator=(), String::operator=(), String::prepend(), and String::through().
00468 { return &(S.rep->s[pos]); } |
|
|
|
Definition at line 1087 of file GString.h. 01088 { 01089 return S.search(pos, pos+len, t) >= 0; 01090 } |
|
|
|
Definition at line 1092 of file GString.h. 01093 { 01094 return S.search(pos, pos+len, y.chars(), y.length()) >= 0; 01095 } |
|
Definition at line 1102 of file GString.h. 01103 { 01104 return S.search(pos, pos+len, c) >= 0; 01105 } |
|
Definition at line 467 of file GString.h. 00467 { return len == 0; } |
|
Definition at line 466 of file GString.h. Referenced by String::after(), String::at(), String::before(), cat(), compare(), contains(), String::contains(), String::del(), String::freq(), String::from(), String::gsub(), String::index(), String::matches(), operator<<(), operator=(), String::operator=(), String::prepend(), and String::through().
00466 { return len; } |
|
|
|
Definition at line 528 of file GString.h. 00529 { 00530 assign(0, &ch, 1); 00531 return *this; 00532 } |
|
Definition at line 522 of file GString.h. 00523 { 00524 assign(0, ys); 00525 return *this; 00526 } |
|
|
|
|
|
|
|
Definition at line 1247 of file GString.cc. |
|
Definition at line 121 of file GString.h. Referenced by operator=().
|
|
|
|
|