ROOT
6.07/01
Reference Guide
|
A zero length substring is legal.
It can start at any character. It is considered to be "pointing" to just before the character.
A "null" substring is a zero length substring that starts with the nonsense index kNPOS. It can be detected with the member function IsNull().
Public Member Functions | |
TSubString (const TSubString &s) | |
TSubString & | operator= (const char *s) |
Assign char* to sub-string. More... | |
TSubString & | operator= (const TString &s) |
Assign string to sub-string. More... | |
TSubString & | operator= (const TSubString &s) |
char & | operator() (Ssiz_t i) |
Return character at pos i from sub-string. No check on i. More... | |
char & | operator[] (Ssiz_t i) |
Return character at pos i from sub-string. Check validity of i. More... | |
char | operator() (Ssiz_t i) const |
char | operator[] (Ssiz_t i) const |
operator std::string_view () const | |
operator std::string () const | |
const char * | Data () const |
Ssiz_t | Length () const |
Ssiz_t | Start () const |
TString & | String () |
void | ToLower () |
Convert sub-string to lower-case. More... | |
void | ToUpper () |
Convert sub-string to upper-case. More... | |
Bool_t | IsNull () const |
int | operator! () const |
Protected Member Functions | |
void | SubStringError (Ssiz_t, Ssiz_t, Ssiz_t) const |
Output error message. More... | |
void | AssertElement (Ssiz_t i) const |
Check to make sure a sub-string index is in range. More... | |
Private Member Functions | |
TSubString (const TString &s, Ssiz_t start, Ssiz_t len) | |
Private constructor. More... | |
Private Attributes | |
TString & | fStr |
Ssiz_t | fBegin |
Ssiz_t | fExtent |
Friends | |
class | TStringLong |
class | TString |
Bool_t | operator== (const TSubString &s1, const TSubString &s2) |
Compare two sub-strings. More... | |
Bool_t | operator== (const TSubString &s1, const TString &s2) |
Compare sub-string to string. More... | |
Bool_t | operator== (const TSubString &s1, const char *s2) |
Compare sub-string to char *. More... | |
#include <TString.h>
Private constructor.
Definition at line 1594 of file TString.cxx.
|
inline |
Check to make sure a sub-string index is in range.
Definition at line 1738 of file TString.cxx.
Referenced by operator[]().
|
inline |
Definition at line 669 of file TString.h.
Referenced by TRootAuth::Authenticate(), TSQLiteStatement::GetTimestamp(), operator std::string(), operator std::string_view(), TString::operator=(), cling::printValue(), and TString::TString().
|
inline |
Definition at line 127 of file TString.h.
Referenced by TRootAuth::Authenticate(), operator=(), TString::operator=(), operator==(), ToLower(), ToUpper(), and TString::TString().
|
inline |
Definition at line 120 of file TString.h.
Referenced by TDocHtmlDirective::AddLine(), TDocLatexDirective::AddLine(), TDocOutput::AddLink(), AssertElement(), TClassDocOutput::ListDataMembers(), TString::operator=(), cling::printValue(), and TString::TString().
|
inline |
char & TSubString::operator() | ( | Ssiz_t | i | ) |
Return character at pos i from sub-string. No check on i.
Definition at line 1640 of file TString.cxx.
TSubString & TSubString::operator= | ( | const char * | s | ) |
Assign char* to sub-string.
Definition at line 1659 of file TString.cxx.
TSubString & TSubString::operator= | ( | const TString & | s | ) |
Assign string to sub-string.
Definition at line 1648 of file TString.cxx.
|
inline |
char & TSubString::operator[] | ( | Ssiz_t | i | ) |
Return character at pos i from sub-string. Check validity of i.
Definition at line 1631 of file TString.cxx.
|
inline |
Definition at line 121 of file TString.h.
Referenced by TDocHtmlDirective::AddLine(), TDocMacroDirective::AddLine(), TDocOutput::AddLink(), and TClassDocOutput::ListDataMembers().
|
inline |
Definition at line 122 of file TString.h.
Referenced by TDocHtmlDirective::AddLine(), and TDocOutput::AddLink().
Output error message.
Definition at line 1729 of file TString.cxx.
void TSubString::ToLower | ( | ) |
Convert sub-string to lower-case.
Definition at line 1705 of file TString.cxx.
void TSubString::ToUpper | ( | ) |
Convert sub-string to upper-case.
Definition at line 1717 of file TString.cxx.
|
friend |
Compare two sub-strings.
Definition at line 1694 of file TString.cxx.
|
friend |
Compare sub-string to string.
Definition at line 1684 of file TString.cxx.
|
friend |
Compare sub-string to char *.
Definition at line 1670 of file TString.cxx.
|
friend |
|
private |
Definition at line 94 of file TString.h.
Referenced by Data(), IsNull(), operator!(), operator()(), operator=(), operator==(), operator[](), Start(), ToLower(), and ToUpper().
|
private |
Definition at line 95 of file TString.h.
Referenced by Length(), operator std::string(), operator std::string_view(), operator=(), operator==(), ToLower(), and ToUpper().
|
private |
Definition at line 93 of file TString.h.
Referenced by Data(), operator()(), operator=(), operator==(), operator[](), String(), ToLower(), and ToUpper().