ROOT logo
ROOT » CORE » BASE » TStringRef

class TStringRef: public TRefCnt


Basic string class.

Cannot be stored in a TCollection... use TObjString instead.

Function Members (Methods)

Ssiz_tCapacity() const
char*Data() const
Ssiz_tFirst(char c) const
Ssiz_tFirst(const char* s) const
static TStringRef*GetRep(Ssiz_t capac, Ssiz_t nchar)
UInt_tHash() const
UInt_tHashFoldCase() const
Ssiz_tLast(char) const
Ssiz_tLength() const
char&operator[](Ssiz_t i)
charoperator[](Ssiz_t i) const

Data Members

enum TRefCnt::EReferenceFlag { kStaticInit
UInt_tTRefCnt::fRefs(1 less than) number of references
Ssiz_tfCapacityMax string length (excluding null)
Ssiz_tfNcharsString length (excluding null)

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

void UnLink()
{ if (RemoveReference() == 0) delete [] (char*)this; }
Ssiz_t Length() const
{ return fNchars; }
Ssiz_t Capacity() const
{ return fCapacity; }
char * Data() const
{ return (char*)(this+1); }
char & operator[](Ssiz_t i)
{ return ((char*)(this+1))[i]; }
char operator[](Ssiz_t i)
{ return ((char*)(this+1))[i]; }
Ssiz_t First(char c)
Ssiz_t First(const char *s)
UInt_t Hash() const
UInt_t HashFoldCase() const
Ssiz_t Last(char ) const
TStringRef * GetRep(Ssiz_t capac, Ssiz_t nchar)
TSubString & operator=(const TStringRef& )