Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MNString Class Reference
[The String class from the historic libg++]

#include <MNString.h>

Inheritance diagram for MNString:

Inheritance graph
[legend]
Collaboration diagram for MNString:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MNString ()
 MNString (const MNString &x)
 MNString (const MNSubString &x)
 MNString (const char *t)
 MNString (const string t)
 MNString (const char *t, int len)
 MNString (char c)
 ~MNString ()
MNStringoperator= (const MNString &y)
MNStringoperator= (const char *y)
MNStringoperator= (char c)
MNStringoperator= (const MNSubString &y)
MNStringoperator= (const string y)
MNStringoperator+= (const MNString &y)
MNStringoperator+= (const MNSubString &y)
MNStringoperator+= (const char *t)
MNStringoperator+= (char c)
void prepend (const MNString &y)
void prepend (const MNSubString &y)
void prepend (const char *t)
void prepend (char c)
int index (char c, int startpos=0) const
int index (const MNString &y, int startpos=0) const
int index (const MNSubString &y, int startpos=0) const
int index (const char *t, int startpos=0) const
int index (const MNRegex &r, int startpos=0) const
int contains (char c) const
int contains (const MNString &y) const
int contains (const MNSubString &y) const
int contains (const char *t) const
int contains (const MNRegex &r) const
int contains (char c, int pos) const
int contains (const MNString &y, int pos) const
int contains (const MNSubString &y, int pos) const
int contains (const char *t, int pos) const
int contains (const MNRegex &r, int pos) const
int matches (char c, int pos=0) const
int matches (const MNString &y, int pos=0) const
int matches (const MNSubString &y, int pos=0) const
int matches (const char *t, int pos=0) const
int matches (const MNRegex &r, int pos=0) const
int freq (char c) const
int freq (const MNString &y) const
int freq (const MNSubString &y) const
int freq (const char *t) const
void del (int pos, int len)
void del (const MNString &y, int startpos=0)
void del (const MNSubString &y, int startpos=0)
void del (const char *t, int startpos=0)
void del (char c, int startpos=0)
void del (const MNRegex &r, int startpos=0)
int gsub (const MNString &pat, const MNString &repl)
int gsub (const MNSubString &pat, const MNString &repl)
int gsub (const char *pat, const MNString &repl)
int gsub (const char *pat, const char *repl)
int gsub (const MNRegex &pat, const MNString &repl)
void reverse ()
void upcase ()
void downcase ()
void capitalize ()
char & operator[] (int i)
const char & operator[] (int i) const
char elem (int i) const
char firstchar () const
char lastchar () const
 operator const char * () const
const char * chars () const
unsigned int length () const
int empty () const
void alloc (int newsize)
int allocation () const
void error (const char *msg) const
int OK () const
at() group.
at() return the substring at the position specified by the first parameter.

MNSubString at (int pos, int len)
MNSubString operator() (int pos, int len)
MNSubString at (const MNString &x, int startpos=0)
MNSubString at (const MNSubString &x, int startpos=0)
MNSubString at (const char *t, int startpos=0)
MNSubString at (char c, int startpos=0)
MNSubString at (const MNRegex &r, int startpos=0)
before() group
MNSubString before (int pos)
MNSubString before (const MNString &x, int startpos=0)
MNSubString before (const MNSubString &x, int startpos=0)
MNSubString before (const char *t, int startpos=0)
MNSubString before (char c, int startpos=0)
MNSubString before (const MNRegex &r, int startpos=0)
through() group
MNSubString through (int pos)
MNSubString through (const MNString &x, int startpos=0)
MNSubString through (const MNSubString &x, int startpos=0)
MNSubString through (const char *t, int startpos=0)
MNSubString through (char c, int startpos=0)
MNSubString through (const MNRegex &r, int startpos=0)
from() group
MNSubString from (int pos)
MNSubString from (const MNString &x, int startpos=0)
MNSubString from (const MNSubString &x, int startpos=0)
MNSubString from (const char *t, int startpos=0)
MNSubString from (char c, int startpos=0)
MNSubString from (const MNRegex &r, int startpos=0)
after() group
MNSubString after (int pos)
MNSubString after (const MNString &x, int startpos=0)
MNSubString after (const MNSubString &x, int startpos=0)
MNSubString after (const char *t, int startpos=0)
MNSubString after (char c, int startpos=0)
MNSubString after (const MNRegex &r, int startpos=0)

Protected Member Functions

int search (int, int, const char *, int=-1) const
int search (int, int, char) const
int match (int, int, int, const char *, int=-1) const
int _gsub (const char *, int, const char *, int)
int _gsub (const MNRegex &, const char *, int)
MNSubString _substr (int, int)

Protected Attributes

MNStrReprep

Friends

void cat (const MNString &, const MNString &, MNString &)
 A concatenation function.
void cat (const MNString &, const MNSubString &, MNString &)
 A concatenation function.
void cat (const MNString &, const char *, MNString &)
 A concatenation function.
void cat (const MNString &, char, MNString &)
 A concatenation function.
void cat (const MNSubString &, const MNString &, MNString &)
 A concatenation function.
void cat (const MNSubString &, const MNSubString &, MNString &)
 A concatenation function.
void cat (const MNSubString &, const char *, MNString &)
 A concatenation function.
void cat (const MNSubString &, char, MNString &)
 A concatenation function.
void cat (const char *, const MNString &, MNString &)
 A concatenation function.
void cat (const char *, const MNSubString &, MNString &)
 A concatenation function.
void cat (const char *, const char *, MNString &)
 A concatenation function.
void cat (const char *, char, MNString &)
 A concatenation function.
void cat (const MNString &, const MNString &, const MNString &, MNString &)
 A concatenation function.
void cat (const MNString &, const MNString &, const MNSubString &, MNString &)
 A concatenation function.
void cat (const MNString &, const MNString &, const char *, MNString &)
 A concatenation function.
void cat (const MNString &, const MNString &, char, MNString &)
 A concatenation function.
void cat (const MNString &, const MNSubString &, const MNString &, MNString &)
 A concatenation function.
void cat (const MNString &, const MNSubString &, const MNSubString &, MNString &)
 A concatenation function.
void cat (const MNString &, const MNSubString &, const char *, MNString &)
 A concatenation function.
void cat (const MNString &, const MNSubString &, char, MNString &)
 A concatenation function.
void cat (const MNString &, const char *, const MNString &, MNString &)
 A concatenation function.
void cat (const MNString &, const char *, const MNSubString &, MNString &)
 A concatenation function.
void cat (const MNString &, const char *, const char *, MNString &)
 A concatenation function.
void cat (const MNString &, const char *, char, MNString &)
 A concatenation function.
void cat (const char *, const MNString &, const MNString &, MNString &)
 A concatenation function.
void cat (const char *, const MNString &, const MNSubString &, MNString &)
 A concatenation function.
void cat (const char *, const MNString &, const char *, MNString &)
 A concatenation function.
void cat (const char *, const MNString &, char, MNString &)
 A concatenation function.
void cat (const char *, const MNSubString &, const MNString &, MNString &)
 A concatenation function.
void cat (const char *, const MNSubString &, const MNSubString &, MNString &)
 A concatenation function.
void cat (const char *, const MNSubString &, const char *, MNString &)
 A concatenation function.
void cat (const char *, const MNSubString &, char, MNString &)
 A concatenation function.
void cat (const char *, const char *, const MNString &, MNString &)
 A concatenation function.
void cat (const char *, const char *, const MNSubString &, MNString &)
 A concatenation function.
void cat (const char *, const char *, const char *, MNString &)
 A concatenation function.
void cat (const char *, const char *, char, MNString &)
 A concatenation function.
int split (const MNString &x, MNString res[], int maxn, const MNString &sep)
int split (const MNString &x, MNString res[], int maxn, const MNRegex &sep)
MNString common_prefix (const MNString &x, const MNString &y, int startpos=0)
MNString common_suffix (const MNString &x, const MNString &y, int startpos=-1)
MNString replicate (char c, int n)
MNString replicate (const MNString &y, int n)
MNString join (MNString src[], int n, const MNString &sep)
MNString reverse (const MNString &x)
MNString upcase (const MNString &x)
MNString downcase (const MNString &x)
MNString capitalize (const MNString &x)
std::ostream & operator<< (std::ostream &s, const MNString &x)
std::ostream & operator<< (std::ostream &s, const MNSubString &x)
std::istream & operator>> (std::istream &s, MNString &x)
int readline (std::istream &s, MNString &x, char terminator= '\n', int discard_terminator=1)

Detailed Description

A flexible string class.
This string class is nearly identical to the old String class of libg++. That string class, which is considered deprecated, was considerably more stable and comprehensible than current string class class such as STL string. This is paid with a considerable resource-hunger.


Member Function Documentation

int MNString::_gsub const MNRegex ,
const char *  ,
int 
[protected]
 

int MNString::_gsub const char *  ,
int  ,
const char *  ,
int 
[protected]
 

MNSubString MNString::_substr int  ,
int 
[protected]
 

MNSubString MNString::after const MNRegex r,
int  startpos = 0
 

MNSubString MNString::after char  c,
int  startpos = 0
 

MNSubString MNString::after const char *  t,
int  startpos = 0
 

MNSubString MNString::after const MNSubString x,
int  startpos = 0
 

MNSubString MNString::after const MNString x,
int  startpos = 0
 

MNSubString MNString::after int  pos  ) 
 

void MNString::alloc int  newsize  ) 
 

MNSubString MNString::at const MNRegex r,
int  startpos = 0
 

MNSubString MNString::at char  c,
int  startpos = 0
 

MNSubString MNString::at const char *  t,
int  startpos = 0
 

MNSubString MNString::at const MNSubString x,
int  startpos = 0
 

MNSubString MNString::at const MNString x,
int  startpos = 0
 

MNSubString MNString::at int  pos,
int  len
 

MNSubString MNString::before const MNRegex r,
int  startpos = 0
 

MNSubString MNString::before char  c,
int  startpos = 0
 

MNSubString MNString::before const char *  t,
int  startpos = 0
 

MNSubString MNString::before const MNSubString x,
int  startpos = 0
 

MNSubString MNString::before const MNString x,
int  startpos = 0
 

MNSubString MNString::before int  pos  ) 
 

void MNString::capitalize  ) 
 

int MNString::contains const MNRegex r,
int  pos
const
 

int MNString::contains const char *  t,
int  pos
const
 

int MNString::contains const MNSubString y,
int  pos
const
 

int MNString::contains const MNString y,
int  pos
const
 

int MNString::contains char  c,
int  pos
const
 

int MNString::contains const MNRegex r  )  const
 

int MNString::contains const char *  t  )  const
 

int MNString::contains const MNSubString y  )  const
 

int MNString::contains const MNString y  )  const
 

int MNString::contains char  c  )  const
 

void MNString::del const MNRegex r,
int  startpos = 0
 

void MNString::del char  c,
int  startpos = 0
 

void MNString::del const char *  t,
int  startpos = 0
 

void MNString::del const MNSubString y,
int  startpos = 0
 

void MNString::del const MNString y,
int  startpos = 0
 

void MNString::del int  pos,
int  len
 

void MNString::downcase  ) 
 

char MNString::elem int  i  )  const
 

void MNString::error const char *  msg  )  const
 

char MNString::firstchar  )  const
 

int MNString::freq const char *  t  )  const
 

int MNString::freq const MNSubString y  )  const
 

int MNString::freq const MNString y  )  const
 

int MNString::freq char  c  )  const
 

MNSubString MNString::from const MNRegex r,
int  startpos = 0
 

MNSubString MNString::from char  c,
int  startpos = 0
 

MNSubString MNString::from const char *  t,
int  startpos = 0
 

MNSubString MNString::from const MNSubString x,
int  startpos = 0
 

MNSubString MNString::from const MNString x,
int  startpos = 0
 

MNSubString MNString::from int  pos  ) 
 

int MNString::gsub const MNRegex pat,
const MNString repl
 

int MNString::gsub const char *  pat,
const char *  repl
 

int MNString::gsub const char *  pat,
const MNString repl
 

int MNString::gsub const MNSubString pat,
const MNString repl
 

int MNString::gsub const MNString pat,
const MNString repl
 

int MNString::index const MNRegex r,
int  startpos = 0
const
 

int MNString::index const char *  t,
int  startpos = 0
const
 

int MNString::index const MNSubString y,
int  startpos = 0
const
 

int MNString::index const MNString y,
int  startpos = 0
const
 

int MNString::index char  c,
int  startpos = 0
const
 

char MNString::lastchar  )  const
 

int MNString::match int  ,
int  ,
int  ,
const char *  ,
int  = -1
const [protected]
 

int MNString::matches const MNRegex r,
int  pos = 0
const
 

int MNString::matches const char *  t,
int  pos = 0
const
 

int MNString::matches const MNSubString y,
int  pos = 0
const
 

int MNString::matches const MNString y,
int  pos = 0
const
 

int MNString::matches char  c,
int  pos = 0
const
 

int MNString::OK  )  const
 

MNString::operator const char *  )  const
 

MNSubString MNString::operator() int  pos,
int  len
 

const char& MNString::operator[] int  i  )  const
 

char& MNString::operator[] int  i  ) 
 

void MNString::prepend char  c  ) 
 

void MNString::prepend const char *  t  ) 
 

void MNString::prepend const MNSubString y  ) 
 

void MNString::prepend const MNString y  ) 
 

void MNString::reverse  ) 
 

int MNString::search int  ,
int  ,
char 
const [protected]
 

int MNString::search int  ,
int  ,
const char *  ,
int  = -1
const [protected]
 

MNSubString MNString::through const MNRegex r,
int  startpos = 0
 

MNSubString MNString::through char  c,
int  startpos = 0
 

MNSubString MNString::through const char *  t,
int  startpos = 0
 

MNSubString MNString::through const MNSubString x,
int  startpos = 0
 

MNSubString MNString::through const MNString x,
int  startpos = 0
 

MNSubString MNString::through int  pos  ) 
 

void MNString::upcase  ) 
 


Friends And Related Function Documentation

MNString capitalize const MNString x  )  [friend]
 

void cat const char *  a,
const char *  x,
char  y,
MNString r
[friend]
 

A concatenation function.

void cat const char *  a,
const char *  x,
const char *  y,
MNString r
[friend]
 

A concatenation function.

void cat const char *  a,
const char *  x,
const MNSubString y,
MNString r
[friend]
 

A concatenation function.

void cat const char *  a,
const char *  x,
const MNString y,
MNString r
[friend]
 

A concatenation function.

void cat const char *  a,
const MNSubString x,
char  y,
MNString r
[friend]
 

A concatenation function.

void cat const char *  a,
const MNSubString x,
const char *  y,
MNString r
[friend]
 

A concatenation function.

void cat const char *  a,
const MNSubString x,
const MNSubString y,
MNString r
[friend]
 

A concatenation function.

void cat const char *  a,
const MNSubString x,
const MNString y,
MNString r
[friend]
 

A concatenation function.

void cat const char *  a,
const MNString x,
char  y,
MNString r
[friend]
 

A concatenation function.

void cat const char *  a,
const MNString x,
const char *  y,
MNString r
[friend]
 

A concatenation function.

void cat const char *  a,
const MNString x,
const MNSubString y,
MNString r
[friend]
 

A concatenation function.

void cat const char *  a,
const MNString x,
const MNString y,
MNString r
[friend]
 

A concatenation function.

void cat const MNString a,
const char *  x,
char  y,
MNString r
[friend]
 

A concatenation function.

void cat const MNString a,
const char *  x,
const char *  y,
MNString r
[friend]
 

A concatenation function.

void cat const MNString a,
const char *  x,
const MNSubString y,
MNString r
[friend]
 

A concatenation function.

void cat const MNString a,
const char *  x,
const MNString y,
MNString r
[friend]
 

A concatenation function.

void cat const MNString a,
const MNSubString x,
char  y,
MNString r
[friend]
 

A concatenation function.

void cat const MNString a,
const MNSubString x,
const char *  y,
MNString r
[friend]
 

A concatenation function.

void cat const MNString a,
const MNSubString x,
const MNSubString y,
MNString r
[friend]
 

A concatenation function.

void cat const MNString a,
const MNSubString x,
const MNString y,
MNString r
[friend]
 

A concatenation function.

void cat const MNString a,
const MNString x,
char  y,
MNString r
[friend]
 

A concatenation function.

void cat const MNString a,
const MNString x,
const char *  y,
MNString r
[friend]
 

A concatenation function.

void cat const MNString a,
const MNString x,
const MNSubString y,
MNString r
[friend]
 

A concatenation function.

void cat const MNString a,
const MNString x,
const MNString y,
MNString r
[friend]
 

A concatenation function.

void cat const char *  x,
char  y,
MNString r
[friend]
 

A concatenation function.

void cat const char *  x,
const char *  y,
MNString r
[friend]
 

A concatenation function.

void cat const char *  x,
const MNSubString y,
MNString r
[friend]
 

A concatenation function.

void cat const char *  x,
const MNString y,
MNString r
[friend]
 

A concatenation function.

void cat const MNSubString x,
char  y,
MNString r
[friend]
 

A concatenation function.

void cat const MNSubString x,
const char *  y,
MNString r
[friend]
 

A concatenation function.

void cat const MNSubString x,
const MNSubString y,
MNString r
[friend]
 

A concatenation function.

void cat const MNSubString x,
const MNString y,
MNString r
[friend]
 

A concatenation function.

void cat const MNString x,
char  y,
MNString r
[friend]
 

A concatenation function.

void cat const MNString x,
const char *  y,
MNString r
[friend]
 

A concatenation function.

void cat const MNString x,
const MNSubString y,
MNString r
[friend]
 

A concatenation function.

void cat const MNString x,
const MNString y,
MNString r
[friend]
 

A concatenation function.

MNString common_prefix const MNString x,
const MNString y,
int  startpos = 0
[friend]
 

MNString common_suffix const MNString x,
const MNString y,
int  startpos = -1
[friend]
 

MNString downcase const MNString x  )  [friend]
 

MNString join MNString  src[],
int  n,
const MNString sep
[friend]
 

std::ostream& operator<< std::ostream &  s,
const MNSubString x
[friend]
 

std::ostream& operator<< std::ostream &  s,
const MNString x
[friend]
 

std::istream& operator>> std::istream &  s,
MNString x
[friend]
 

int readline std::istream &  s,
MNString x,
char  terminator = '\n',
int  discard_terminator = 1
[friend]
 

MNString replicate const MNString y,
int  n
[friend]
 

MNString replicate char  c,
int  n
[friend]
 

MNString reverse const MNString x  )  [friend]
 

int split const MNString x,
MNString  res[],
int  maxn,
const MNRegex sep
[friend]
 

int split const MNString x,
MNString  res[],
int  maxn,
const MNString sep
[friend]
 

MNString upcase const MNString x  )  [friend]
 


Member Data Documentation

MNStrRep* MNString::rep [protected]
 


The documentation for this class was generated from the following file:
Generated on Sun Mar 6 13:36:03 2005 for Komssys by doxygen 1.3.8