66#define strtoull _strtoui64
70namespace std { using ::list; }
137 Error(
"TString::TString",
"NULL input string!");
142 Error(
"TString::TString",
"Negative length!");
147 Warning(
"TString::TString",
"Input string is shorter than requested size.");
176 Error(
"TString::TString",
"Negative length!");
204 fRep.fRaw = s.fRep.fRaw;
234 Error(
"TString::TString",
"Negative first length!");
239 Error(
"TString::TString",
"Negative second length!");
247 Error(
"TString::TString",
"Too large number of characters!");
272 Error(
"TString::Init",
"Negative length!");
276 Error(
"*TString::Init",
"Negative length!");
279 if (
nchar > capacity) {
280 Error(
"TString::Init",
"capacity is smaller than nchar (%d > %d)",
nchar, capacity);
284 Fatal(
"TString::Init",
"capacity too large (%d, max = %d)", capacity,
MaxSize());
286 if (
nchar > capacity)
382 fRep.fRaw =
rhs.fRep.fRaw;
407 if (!
rep)
return *
this;
410 Error(
"TString::Append",
"Negative length!");
473 for (;
cs2[i]; ++i) {
474 if (i ==
len)
return -1;
475 if (
cs1[i] !=
cs2[i])
return ((
cs1[i] >
cs2[i]) ? 1 : -1);
478 for (;
cs2[i]; ++i) {
479 if (i ==
len)
return -1;
482 if (
c1 !=
c2)
return ((
c1 >
c2) ? 1 : -1);
485 return (i <
len) ? 1 : 0;
498 const char *
s2 = str.Data();
508 for (; i <
slen; ++i) {
511 if (
c1 !=
c2)
return ((
c1 >
c2) ? 1 : -1);
529 if (
data[
n] ==
c) count++;
566 return (((
x & 0x000000ffU) << 24) | ((
x & 0x0000ff00U) << 8) |
567 ((
x & 0x00ff0000U) >> 8) | ((
x & 0xff000000U) >> 24));
604 if ((i =
len*
sizeof(
char)%
sizeof(
UInt_t)) != 0) {
606 const char*
c = (
const char*)
p;
614 const unsigned char *
p = (
const unsigned char*)str;
627 if ((i =
len*
sizeof(
char)%
sizeof(
UInt_t)) != 0) {
629 const char*
c = (
const char*)
p;
659 const char*
c = (
const char*)
p;
674 const unsigned char *
p = (
const unsigned char*)
Data();
710#if defined(_MSC_VER) && (_MSC_VER < 1800)
712 typedef unsigned char uint8_t;
713 typedef unsigned long uint32_t;
714 typedef unsigned __int64 uint64_t;
724#define ROTL64(x,y) _rotl64(x,y)
725#define BIG_CONSTANT(x) (x)
730 return (
x <<
r) | (
x >> (64 -
r));
733#define ROTL64(x,y) rotl64(x,y)
734#define BIG_CONSTANT(x) (x##LLU)
769 const uint32_t seed, uint64_t out[2] )
771 const uint8_t *
data = (
const uint8_t*)key;
783 const uint64_t *
blocks = (
const uint64_t *)(
data);
785 for(
int i = 0; i <
nblocks; i++)
796 h2 =
ROTL64(h2,31); h2 +=
h1; h2 = h2*5+0x38495ab5;
802 const uint8_t * tail = (
const uint8_t*)(
data +
nblocks*16);
808 case 15:
k2 ^= uint64_t(tail[14]) << 48;
809 case 14:
k2 ^= uint64_t(tail[13]) << 40;
810 case 13:
k2 ^= uint64_t(tail[12]) << 32;
811 case 12:
k2 ^= uint64_t(tail[11]) << 24;
812 case 11:
k2 ^= uint64_t(tail[10]) << 16;
813 case 10:
k2 ^= uint64_t(tail[ 9]) << 8;
814 case 9:
k2 ^= uint64_t(tail[ 8]) << 0;
817 case 8:
k1 ^= uint64_t(tail[ 7]) << 56;
818 case 7:
k1 ^= uint64_t(tail[ 6]) << 48;
819 case 6:
k1 ^= uint64_t(tail[ 5]) << 40;
820 case 5:
k1 ^= uint64_t(tail[ 4]) << 32;
821 case 4:
k1 ^= uint64_t(tail[ 3]) << 24;
822 case 3:
k1 ^= uint64_t(tail[ 2]) << 16;
823 case 2:
k1 ^= uint64_t(tail[ 1]) << 8;
824 case 1:
k1 ^= uint64_t(tail[ 0]) << 0;
842 ((uint64_t*)out)[0] =
h1;
843 ((uint64_t*)out)[1] = h2;
860 if (
ntxt !=
sizeof(
void*)) {
861 uint64_t buf[2] = {0};
868 if (((
size_t)
txt) %
sizeof(
void*)) {
871 if (
sizeof(
void*) >
sizeof(
UInt_t)) {
875 const unsigned char*
ctxt = (
const unsigned char*)
txt;
876 for (
unsigned int i = 0; i < 4; ++i) {
879 if (
sizeof(
void*) >
sizeof(
UInt_t)) {
881 for (
unsigned int i = 0; i < 4; ++i) {
913 Error(
"TString::Index",
"Negative first pattern length!");
922 char first = *pattern;
927 int first =
tolower((
unsigned char) *pattern);
929 if (
tolower((
unsigned char)
sp[i]) == first &&
954 return md5.AsString();
1031 Error(
"TString::Replace",
1032 "first argument out of bounds: pos = %d, Length = %d", pos,
len);
1036 Error(
"TString::Replace",
"Negative number of characters to remove!");
1040 Error(
"TString::Replace",
"Negative number of replacement characters!");
1049 Error(
"TString::Replace",
"Too large number of characters!");
1068 if (
p + pos +
n1 <=
cs)
1106 if (
s1 &&
ls1 > 0) {
1140 while (start < end &&
direct[start] ==
c)
1143 while (start < end &&
direct[end-1] ==
c)
1153 Remove(send - start - (send - end), send - end);
1178 while (start < end &&
direct[start] ==
c)
1181 while (start < end &&
direct[end-1] ==
c)
1183 if (end == start) start = end =
kNPOS;
1219 Error(
"TString::AssertElement",
1220 "out of bounds: i = %d, Length = %d", i,
Length());
1232 Fatal(
"TString::AdjustCapacity",
"capacity too large (%d, max = %d)",
1256 Fatal(
"TString::Clobber",
"capacity too large (%d, max = %d)", nc,
MaxSize());
1292 Fatal(
"TString::Clone",
"tot too large (%d, max = %d)",
tot,
MaxSize());
1331 for (
int i = 0; i <
nchars; i++) buffer[i] =
data[i];
1353 Error(
"TString::ReadBuffer",
"found case with nwh=%d and nchars=%d",
nwh,
nchars);
1391 ::Error(
"TString::ReadObject",
"could not create object of class %s",
1421 if (
b.IsReading()) {
1422 b.ReadTString(*
this);
1424 b.WriteTString(*
this);
1465#if defined(R__TEMPLATE_OVERLOAD_BUG)
1493 const char *
data =
s1.Data();
1496 for (i = 0;
s2[i]; ++i)
1508 const char *
uc = str.Data();
1509 char *
lc = (
char*)temp.
Data();
1522 const char*
uc = str.Data();
1523 char*
lc = (
char*)temp.
Data();
1577 ::Obsolete(
"TString::GetInitialCapacity",
"v5-30-00",
"v5-32-00");
1585 ::Obsolete(
"TString::GetResizeIncrement",
"v5-30-00",
"v5-32-00");
1593 ::Obsolete(
"TString::GetMaxWaste",
"v5-30-00",
"v5-32-00");
1602 ::Obsolete(
"TString::InitialCapacity",
"v5-30-00",
"v5-32-00");
1611 ::Obsolete(
"TString::ResizeIncrement",
"v5-30-00",
"v5-32-00");
1621 ::Obsolete(
"TString::MaxWaste",
"v5-30-00",
"v5-32-00");
1716 if (
ss.IsNull())
return *
cs ==
'\0';
1718 const char*
data =
ss.fStr.Data() +
ss.fBegin;
1720 for (i = 0;
cs[i]; ++i)
1722 return (i ==
ss.fExtent);
1730 if (
ss.IsNull())
return s.
IsNull();
1740 if (
s1.IsNull())
return s2.IsNull();
1742 return !
memcmp(
s1.fStr.Data()+
s1.fBegin,
s2.fStr.Data()+
s2.fBegin,
1754 while (
n--) { *
p =
tolower((
unsigned char)*
p);
p++;}
1766 while (
n--) { *
p =
toupper((
unsigned char)*
p);
p++;}
1775 Error(
"TSubString::SubStringError",
1776 "out of bounds: start = %d, n = %d, sr = %d", start,
n, sr);
1785 Error(
"TSubString::AssertElement",
1786 "out of bounds: i = %d, Length = %d", i,
Length());
1845 if (
cp[i] ==
' ')
b++;
1875 Ssiz_t pos = tmp.First(
'.');
1876 if (pos !=
kNPOS) tmp.Replace(pos, 1,
" ", 1);
1877 pos = tmp.First(
',');
1878 if (pos !=
kNPOS) tmp.Replace(pos, 1,
" ", 1);
1879 pos = tmp.Index(
"e-");
1880 if (pos >= 1) tmp.Replace(pos, 2,
" ", 1);
1881 pos = tmp.Index(
"e+");
1882 if (pos >= 1) tmp.Replace(pos, 2,
" ", 1);
1883 pos = tmp.Index(
"e");
1884 if (pos >= 1) tmp.Replace(pos, 1,
" ", 1);
1885 pos = tmp.First(
'-');
1886 if (pos == 0) tmp.Replace(pos, 1,
" ", 1);
1887 pos = tmp.First(
'+');
1888 if (pos == 0) tmp.Replace(pos, 1,
" ", 1);
1891 return tmp.IsDigit();
1921 if (
cp[i] !=
'0' &&
cp[i] !=
'1')
1967 Error(
"TString::IsInBaseN",
"base %d is not supported. Supported bases are {2,3,...,36}.", base);
1971 Error(
"TString::IsInBaseN",
"input string is empty.") ;
1980 for (
Int_t k = 0; k < str.Length(); k++) {
1981 if (!
str_ref.Contains(str[k])) {
2000 if (end == -1)
return atoi(
Data());
2006 tmp += (*this)(start, end-start);
2007 start = end+1; end =
Index(
" ", start);
2011 tmp += (*this)(start, end-start);
2012 return atoi(tmp.Data());
2036 tmp += (*this)(start, end-start);
2037 start = end+1; end =
Index(
" ", start);
2041 tmp += (*this)(start, end-start);
2043 return atoll(tmp.Data());
2067 if (
comma == -1 && end == -1)
return atof(
Data());
2071 tmp.Replace(
comma, 1,
".");
2074 if (end == -1)
return atof(tmp.Data());
2079 tmp2 += tmp(start, end-start);
2080 start = end+1; end = tmp.Index(
" ", start);
2083 tmp2 += tmp(start, end-start);
2084 return atof(
tmp2.Data());
2104 Error(
"TString::Itoa",
"base %d is not supported. Supported bases are {2,3,...,36}.",base) ;
2111 buf +=
"0123456789abcdefghijklmnopqrstuvwxyz"[ std::abs(
quotient % base) ];
2115 if (
value < 0) buf +=
'-';
2116 std::reverse(buf.begin(), buf.end());
2131 Error(
"TString::UItoa",
"base %d is not supported. Supported bases are {2,3,...,36}.",base);
2138 buf +=
"0123456789abcdefghijklmnopqrstuvwxyz"[
quotient % base ];
2141 std::reverse(buf.begin(), buf.end());
2156 Error(
"TString::LLtoa",
"base %d is not supported. Supported bases are {2,3,...,36}.",base);
2163 buf +=
"0123456789abcdefghijklmnopqrstuvwxyz"[ std::abs(
quotient % base) ];
2167 if (
value < 0) buf +=
'-';
2168 std::reverse(buf.begin(), buf.end());
2183 Error(
"TString::ULLtoa",
"base %d is not supported. Supported bases are {2,3,...,36}.",base);
2190 buf +=
"0123456789abcdefghijklmnopqrstuvwxyz"[
quotient % base ];
2193 std::reverse(buf.begin(), buf.end());
2206 Error(
"TString::BaseConvert",
"only bases 2-36 are supported (base_in=%d, base_out=%d).",
base_in,
base_out);
2212 if (
s_in_[0] ==
'-') {
2222 Error(
"TString::BaseConvert",
"s_in=\"%s\" is not in base %d",
s_in.Data(),
base_in);
2229 Error(
"TString::BaseConvert",
"s_in=\"%s\" > %s = 2^64-1 in base %d.",
s_in.Data(),
s_max.Data(),
base_in);
2231 }
else if (
s_in_.Length() ==
s_max.Length()) {
2236 Error(
"TString::BaseConvert",
"s_in=\"%s\" > %s = 2^64-1 in base %d.",
s_in.Data(),
s_max.Data(),
base_in);
2253 if (!s)
return kTRUE;
2276 for (i = 0; i <
delim.Length(); i++) {
2278 while (start <
Length()) {
2280 if (pos ==
kNPOS)
break;
2295 std::list<Int_t>::const_iterator it;
2302 if (stop - 1 >= start + 1) {
2303 TString tok = (*this)(start+1, stop-start-1);
2330 if (
n == -1 ||
n >= buflen) {
2451 static const int cb_size = 4096;
2530 if (!s)
return nullptr;
2533 char *buf =
new char[
l+1];
2546 const char *
t2 = s +
l - 1;
2547 while (*
t2 ==
c &&
t2 > s)
2555 *(buf+(
t2-
t1+1)) =
'\0';
2566 if (!str)
return nullptr;
2569 char *s =
new char[
len];
2581 if (!str)
return nullptr;
2583 const char *
p = str;
2584 char *s, *
s1 =
new char[
strlen(str)+1];
2642#ifdef NEED_STRCASECMP
2680std::string cling::printValue(
const TString* val) {
2688std::string cling::printValue(
const TSubString* val) {
2696std::string cling::printValue(
const std::string_view* val) {
2697 std::string str(*val);
void frombuf(char *&buf, Bool_t *x)
void tobuf(char *&buf, Bool_t x)
int Int_t
Signed integer 4 bytes (int)
unsigned char UChar_t
Unsigned Character 1 byte (unsigned char)
int Ssiz_t
String size (currently int)
constexpr ULong_t kBitsPerByte
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
unsigned long ULongptr_t
Unsigned integer large enough to hold a pointer (platform-dependent)
constexpr Ssiz_t kNPOS
The equivalent of std::string::npos for the ROOT class TString.
long long Long64_t
Portable signed long integer 8 bytes.
unsigned long long ULong64_t
Portable unsigned long integer 8 bytes.
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
void ErrorHandler(int level, const char *location, const char *fmt, std::va_list va)
General error handler function. It calls the user set error handler.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
void Obsolete(const char *function, const char *asOfVers, const char *removedFromVers)
Use this function to declare a function obsolete.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
void Fatal(const char *location, const char *msgfmt,...)
Use this function in case of a fatal error. It will abort the program.
Bool_t gPrintViaErrorHandler
If true, ROOT's Printf will print via the currently active ROOT error handler; if false (default),...
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t format
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t nchar
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t src
TBuffer & operator<<(TBuffer &buf, const TString *s)
Write TString or derived to TBuffer.
uint64_t rotl64(uint64_t x, int8_t r)
TString ToLower(const TString &str)
Return a lower-case version of str.
TString operator+(const TString &s, const char *cs)
Use the special concatenation constructor.
static int MemIsEqual(const char *p, const char *q, Ssiz_t n)
Returns false if strings are not equal.
TBuffer & operator>>(TBuffer &buf, TString *&s)
Read string from TBuffer. Function declared in ClassDef.
Bool_t operator==(const TString &s1, const char *s2)
Compare TString with a char *.
UInt_t Hash(const char *str)
Return a case-sensitive hash value (endian independent).
static char * SlowFormat(const char *format, va_list ap, int hint)
Format a string in a formatting buffer (using a printf style format descriptor).
TString ToUpper(const TString &str)
Return an upper-case version of str.
static UInt_t SwapInt(UInt_t x)
static void Mash(UInt_t &hash, UInt_t chars)
Utility used by Hash().
char * Compress(const char *str)
Remove all blanks from the string str.
int UnEscChar(const char *src, char *dst, int dstlen, char *specchars, char escchar)
Un-escape specchars in src from escchar and copy to dst.
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
char * StrDup(const char *str)
Duplicate the string str.
int EscChar(const char *src, char *dst, int dstlen, char *specchars, char escchar)
Escape specchars in src with escchar and copy to dst.
#define R__VA_COPY(to, from)
const_iterator begin() const
const_iterator end() const
Buffer base class used for serializing objects.
TClass instances represent classes, structs and namespaces in the ROOT type system.
void Streamer(void *obj, TBuffer &b, const TClass *onfile_class=nullptr) const
TClass * IsA() const override
This code implements the MD5 message-digest algorithm.
Collectable string class.
TString Copy() const
Copy a string.
static TString UItoa(UInt_t value, Int_t base)
Converts a UInt_t (twice the range of an Int_t) to a TString with respect to the base specified (2-36...
static TString LLtoa(Long64_t value, Int_t base)
Converts a Long64_t to a TString with respect to the base specified (2-36).
void SetShortSize(Ssiz_t s)
char & operator()(Ssiz_t i)
Bool_t IsDec() const
Returns true if all characters in string are decimal digits (0-9).
void ToLower()
Change string to lower-case.
int CompareTo(const char *cs, ECaseCompare cmp=kExact) const
Compare a string to char *cs2.
static Ssiz_t MaxWaste(Ssiz_t mw=15)
Set maximum space that may be wasted in a string before doing a resize.
Int_t Atoi() const
Return integer value of string.
void SetLongSize(Ssiz_t s)
static constexpr Ssiz_t kNPOS
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
TString()
TString default ctor.
Bool_t IsHex() const
Returns true if all characters in string are hexadecimal digits (0-9,a-f,A-F).
Double_t Atof() const
Return floating-point value contained in string.
TString & ReplaceSpecialCppChars()
Find special characters which are typically used in printf() calls and replace them by appropriate es...
Bool_t IsFloat() const
Returns kTRUE if string contains a floating point or integer number.
void Clear()
Clear string without changing its capacity.
TSubString SubString(const char *pat, Ssiz_t start=0, ECaseCompare cmp=kExact) const
Returns a substring matching "pattern", or the null substring if there is no such match.
TString & Replace(Ssiz_t pos, Ssiz_t n, const char *s)
Ssiz_t First(char c) const
Find first occurrence of a character c.
const char * Data() const
static TString * ReadString(TBuffer &b, const TClass *clReq)
Read TString object from buffer.
Bool_t IsDigit() const
Returns true if all characters in string are digits (0-9) or white spaces, i.e.
Bool_t MaybeRegexp() const
Returns true if string contains one of the regexp characters "^$.[]*+?".
static Ssiz_t ResizeIncrement(Ssiz_t ri=16)
Set default resize increment for all TStrings. Default is 16.
UInt_t HashCase() const
Return a case-sensitive hash value (endian independent).
Bool_t IsOct() const
Returns true if all characters in string are octal digits (0-7).
virtual ~TString()
Delete a TString.
static Ssiz_t GetMaxWaste()
TString & ReplaceAll(const TString &s1, const TString &s2)
static Ssiz_t AdjustCapacity(Ssiz_t oldCap, Ssiz_t newCap)
Calculate a nice capacity greater than or equal to newCap.
TString MD5() const
Return the MD5 digest for this string, in a string representation.
void Resize(Ssiz_t n)
Resize the string. Truncate or add blanks as necessary.
Bool_t IsAlpha() const
Returns true if all characters in string are alphabetic.
UInt_t HashFoldCase() const
Return a case-insensitive hash value (endian independent).
Ssiz_t Last(char c) const
Find last occurrence of a character c.
void ToUpper()
Change string to upper case.
Bool_t IsAscii() const
Returns true if all characters in string are ascii.
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
static Ssiz_t GetResizeIncrement()
void SetLongCap(Ssiz_t s)
TString & Prepend(const char *cs)
Bool_t IsBin() const
Returns true if all characters in string are binary digits (0,1).
static TString BaseConvert(const TString &s_in, Int_t base_in, Int_t base_out)
Converts string from base base_in to base base_out.
static TString ULLtoa(ULong64_t value, Int_t base)
Converts a ULong64_t (twice the range of an Long64_t) to a TString with respect to the base specified...
Int_t CountChar(Int_t c) const
Return number of times character c occurs in the string.
static constexpr Ssiz_t MaxSize()
UInt_t Hash(ECaseCompare cmp=kExact) const
Return hash value.
static void WriteString(TBuffer &b, const TString *a)
Write TString object to buffer.
virtual void FillBuffer(char *&buffer) const
Copy string into I/O buffer.
TString & operator=(char s)
Assign character c to TString.
TString & Remove(Ssiz_t pos)
static Ssiz_t InitialCapacity(Ssiz_t ic=15)
Set default initial capacity for all TStrings. Default is 15.
virtual void Streamer(TBuffer &)
Stream a string object.
TString & Append(const char *cs)
Bool_t IsInBaseN(Int_t base) const
Returns true if all characters in string are expressed in the base specified (range=2-36),...
char * Init(Ssiz_t capacity, Ssiz_t nchar)
Private member function returning an empty string representation of size capacity and containing ncha...
Bool_t MaybeWildcard() const
Returns true if string contains one of the wildcard characters "[]*?".
void InitChar(char c)
Initialize a string with a single character.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
static TString Itoa(Int_t value, Int_t base)
Converts an Int_t to a TString with respect to the base specified (2-36).
virtual Int_t Sizeof() const
Returns size string will occupy on I/O buffer.
Ssiz_t Clobber(Ssiz_t nc)
Clear string and make sure it has a capacity of nc.
void Clone(Ssiz_t nc)
Make self a distinct copy with capacity of at least tot, where tot cannot be smaller than the current...
void SetLongPointer(char *p)
Ssiz_t GetLongSize() const
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
static Ssiz_t GetInitialCapacity()
void AssertElement(Ssiz_t nc) const
Check to make sure a string index is in range.
virtual void ReadBuffer(char *&buffer)
Read string from I/O buffer.
Bool_t IsAlnum() const
Returns true if all characters in string are alphanumeric.
void FormImp(const char *fmt, va_list ap)
Formats a string using a printf style format descriptor.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
static Ssiz_t Recommend(Ssiz_t s)
Long64_t Atoll() const
Return long long value of string.
A zero length substring is legal.
TSubString(const TString &s, Ssiz_t start, Ssiz_t len)
Private constructor.
TSubString & operator=(const char *s)
Assign char* to sub-string.
void ToUpper()
Convert sub-string to upper-case.
void SubStringError(Ssiz_t, Ssiz_t, Ssiz_t) const
Output error message.
char & operator[](Ssiz_t i)
Return character at pos i from sub-string. Check validity of i.
void AssertElement(Ssiz_t i) const
Check to make sure a sub-string index is in range.
void ToLower()
Convert sub-string to lower-case.
const char * Data() const
char & operator()(Ssiz_t i)
Return character at pos i from sub-string. No check on i.