#include <common/lstring.h>
Public Members | |
| LString (void) | |
| build an empty LString. | |
| LString (const char *pStr) | |
build an Lstring for a char *
| |
| LString (const LString& lstring) | |
| copy constructor (fast). | |
| LString (const String &x) | |
| Create an LString from a String. More... | |
| unsigned | size () const |
| Return length of LString. | |
| unsigned | length () const |
| Return length of LString. | |
| const char* | c_str () const |
| Return as const char *. | |
| operator const char * () const | |
| Return as a cast. More... | |
| String | operator+ (const LString& lstring2) const |
| bool | operator== (const LString &lstring) const |
| bool | operator!= (const LString &lstring) const |
| LString& | operator= (const LString &lstring) |
| bool | operator< (const LString &lstring) const |
| int | get_ordinal () const |
| get ordinal associate with an LString. More... | |
Static Public Members | |
| bool | exists (const char *str) |
Does an LString exist with the given value
| |
In addition, each unique value has an unique ordinal associated with it which makes it easy to build arrays using an LString index. \see SparseVector
build an empty LString.
build an Lstring for a char *
For LString constants, create them during program initialization using static LStrings and try to share commonly used constants}
copy constructor (fast).
Create an LString from a String.
Also slow - see above comments
Return length of LString.
Return length of LString.
Return as const char *.
Return as a cast.
Will happen implicitly
get ordinal associate with an LString.
Each unique LString has a unique ordinal. This is useful for indexing into an array (for operators, for example, which are LStrings in SUIF)
[static]Does an LString exist with the given value
Extries are not removed when an LString is destructed, so there may be no actual LString with the given value}
written by Dimitri van Heesch, © 1997-1999