Main Page Class Hierarchy Compound List File List Compound Members File Members
String Class Reference
#include <String.h>
Inheritance diagram for String:
Collaboration diagram for String:
List of all members.
Detailed Description
Definition at line 80 of file String.h.
Constructor & Destructor Documentation
String::String (const String & sb)
|
String::~String () [inline]
|
Member Function Documentation
add 's' to the end of the string.
Definition at line 45 of file String.cc.
Char * String::CString () const [inline]
|
String & String::Delete (Int start, Int length)
|
delete the 'length' characters starting at 'start'.
Reimplemented from Array.
Definition at line 63 of file String.cc.
Int String::FindChar (Char c) const [inline]
|
Int String::FindCharLast (Char c) const [inline]
|
Void String::Free () [inline]
|
insert 's' at character 'place' in the string.
Definition at line 53 of file String.cc.
Int String::Length () const [inline]
|
String String::Prefix (Int length) const [inline]
|
String & String::Printf (const Char * format, ...)
|
String equivalent of sprintf.
WARNING: due to vararg/C++ limitations, you cannot
pass a String or StrConst as an argument of Printf.
Instead use something like
myString.Printf("s.abc", myString.CString());
C++ will *not* perform the String->Char* conversion
automatically.
NOTE: we use const Char* for format instead of StrConst
because of bugginess on the part of Irix's CC
Definition at line 250 of file String.cc.
istream & String::ReadLine (istream & s)
|
istream & String::ReadString (istream & s)
|
read a quote-enclosed string, e.g. "hello".
Definition at line 145 of file String.cc.
istream & String::ReadWord (istream & s)
|
read the next string of non-whitespace characters.
Definition at line 194 of file String.cc.
String String::SubString (Int start, Int length) const [inline]
|
String String::Suffix (Int length) const [inline]
|
String::operator StrConst () const [inline]
|
String::operator const Char * () const [inline]
|
Bool String::operator!= (const String & s) const [inline]
|
Bool String::operator!= (const Char * s) const [inline]
|
String & String::operator+= (StrConst s) [inline]
|
String & String::operator= (const Char * s)
|
Bool String::operator== (const String & s) const [inline]
|
Bool String::operator== (const Char * s) const [inline]
|
These are so we can compare directly to C strings. If we don't have
these operators, a String will be cast to a Char*, and a pointer
comparison will occur -- not what we want.
C++'s lack of knowledge about reflexive operators means we have to
define *everything*, otherwise we get ambiguity.
Definition at line 115 of file String.h.
Member Data Documentation
The documentation for this class was generated from the following files:
Generated at Sat Aug 5 00:16:34 2000 for Class Library by
1.1.0 written by Dimitri van Heesch,
© 1997-2000