SNAP Library 6.0, Developer Reference  2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
TStr Class Reference

#include <dt.h>

Inheritance diagram for TStr:
Collaboration diagram for TStr:

Public Member Functions

 TStr ()
 
 TStr (const TStr &Str)
 
 TStr (const TChA &ChA)
 
 TStr (const TSStr &SStr)
 
 TStr (const char *CStr)
 
 TStr (const char &Ch)
 
 TStr (const TMem &Mem)
 
 TStr (const PSIn &SIn)
 
 ~TStr ()
 
 TStr (TSIn &SIn, const bool &IsSmall=false)
 
void Load (TSIn &SIn, const bool &IsSmall=false)
 
void Save (TSOut &SOut, const bool &IsSmall=false) const
 
void LoadXml (const PXmlTok &XmlTok, const TStr &Nm)
 
void SaveXml (TSOut &SOut, const TStr &Nm) const
 
TStroperator= (const TStr &Str)
 
TStroperator= (const TChA &ChA)
 
TStroperator= (const char *CStr)
 
TStroperator= (const char &Ch)
 
TStroperator+= (const TStr &Str)
 
TStroperator+= (const char *CStr)
 
TStroperator/ (const int &N)
 
bool operator== (const TStr &Str) const
 
bool operator== (const char *CStr) const
 
bool operator!= (const char *CStr) const
 
bool operator< (const TStr &Str) const
 
char operator[] (const int &ChN) const
 
int GetMemUsed () const
 
char * operator() ()
 
const char * operator() () const
 
char * CStr ()
 
const char * CStr () const
 
void PutCh (const int &ChN, const char &Ch)
 
char GetCh (const int &ChN) const
 
char LastCh () const
 
void Clr ()
 
int Len () const
 
bool Empty () const
 
bool IsUc () const
 
TStrToUc ()
 
TStr GetUc () const
 
int CmpI (const TStr &Str) const
 
bool EqI (const TStr &Str) const
 
bool IsLc () const
 
TStrToLc ()
 
TStr GetLc () const
 
TStrToCap ()
 
TStr GetCap () const
 
TStrToTrunc ()
 
TStr GetTrunc () const
 
TStrConvUsFromYuAscii ()
 
TStr GetUsFromYuAscii () const
 
TStrToHex ()
 
TStr GetHex () const
 
TStrFromHex ()
 
TStr GetFromHex () const
 
TStr GetSubStr (const int &BChN, const int &EChN) const
 
TStr GetSubStr (const int &BChN) const
 
void InsStr (const int &BChN, const TStr &Str)
 
void DelChAll (const char &Ch)
 
void DelSubStr (const int &BChN, const int &EChN)
 
bool DelStr (const TStr &Str)
 
TStr LeftOf (const char &SplitCh) const
 
TStr LeftOfLast (const char &SplitCh) const
 
TStr RightOf (const char &SplitCh) const
 
TStr RightOfLast (const char &SplitCh) const
 
void SplitOnCh (TStr &LStr, const char &SplitCh, TStr &RStr) const
 
void SplitOnLastCh (TStr &LStr, const char &SplitCh, TStr &RStr) const
 
void SplitOnAllCh (const char &SplitCh, TStrV &StrV, const bool &SkipEmpty=true) const
 
void SplitOnAllAnyCh (const TStr &SplitChStr, TStrV &StrV, const bool &SkipEmpty=true) const
 
void SplitOnWs (TStrV &StrV) const
 
void SplitOnNonAlNum (TStrV &StrV) const
 
void SplitOnStr (const TStr &SplitStr, TStrV &StrV) const
 
void SplitOnStr (TStr &LeftStr, const TStr &MidStr, TStr &RightStr) const
 
TStr Mid (const int &BChN, const int &Chs) const
 
TStr Mid (const int &BChN) const
 
TStr Left (const int &EChN) const
 
TStr Right (const int &BChN) const
 
TStr Slice (int BChN, int EChNP1) const
 
TStr operator() (const int &BChN, const int &EChNP1) const
 
int CountCh (const char &Ch, const int &BChN=0) const
 
int SearchCh (const char &Ch, const int &BChN=0) const
 
int SearchChBack (const char &Ch, int BChN=-1) const
 
int SearchStr (const TStr &Str, const int &BChN=0) const
 
bool IsChIn (const char &Ch) const
 
bool IsStrIn (const TStr &Str) const
 
bool IsPrefix (const char *Str) const
 
bool IsPrefix (const TStr &Str) const
 
bool IsSuffix (const char *Str) const
 
bool IsSuffix (const TStr &Str) const
 
int ChangeCh (const char &SrcCh, const char &DstCh, const int &BChN=0)
 
int ChangeChAll (const char &SrcCh, const char &DstCh)
 
int ChangeStr (const TStr &SrcStr, const TStr &DstStr, const int &BChN=0)
 
int ChangeStrAll (const TStr &SrcStr, const TStr &DstStr, const bool &FromStartP=false)
 
TStr Reverse () const
 
int GetPrimHashCd () const
 
int GetSecHashCd () const
 
bool IsBool (bool &Val) const
 
bool IsInt (const bool &Check, const int &MnVal, const int &MxVal, int &Val) const
 
bool IsInt (int &Val) const
 
bool IsInt () const
 
int GetInt () const
 
int GetInt (const int &DfVal) const
 
bool IsUInt (const bool &Check, const uint &MnVal, const uint &MxVal, uint &Val) const
 
bool IsUInt (uint &Val) const
 
bool IsUInt () const
 
uint GetUInt () const
 
uint GetUInt (const uint &DfVal) const
 
bool IsInt64 (const bool &Check, const int64 &MnVal, const int64 &MxVal, int64 &Val) const
 
bool IsInt64 (int64 &Val) const
 
bool IsInt64 () const
 
int64 GetInt64 () const
 
int64 GetInt64 (const int64 &DfVal) const
 
bool IsUInt64 (const bool &Check, const uint64 &MnVal, const uint64 &MxVal, uint64 &Val) const
 
bool IsUInt64 (uint64 &Val) const
 
bool IsUInt64 () const
 
uint64 GetUInt64 () const
 
uint64 GetUInt64 (const uint64 &DfVal) const
 
bool IsHexInt (const bool &Check, const int &MnVal, const int &MxVal, int &Val) const
 
bool IsHexInt (int &Val) const
 
bool IsHexInt () const
 
int GetHexInt () const
 
int GetHexInt (const int &DfVal) const
 
bool IsHexInt64 (const bool &Check, const int64 &MnVal, const int64 &MxVal, int64 &Val) const
 
bool IsHexInt64 (int64 &Val) const
 
bool IsHexInt64 () const
 
int64 GetHexInt64 () const
 
int64 GetHexInt64 (const int64 &DfVal) const
 
bool IsFlt (const bool &Check, const double &MnVal, const double &MxVal, double &Val, const char &DecDelimCh='.') const
 
bool IsFlt (double &Val) const
 
bool IsFlt () const
 
double GetFlt () const
 
double GetFlt (const double &DfVal) const
 
bool IsWord (const bool &WsPrefixP=true, const bool &FirstUcAllowedP=true) const
 
bool IsWs () const
 
bool IsWcMatch (const int &StrBChN, const TStr &WcStr, const int &WcStrBChN, TStrV &StarStrV, const char &StarCh='*', const char &QuestCh='?') const
 
bool IsWcMatch (const TStr &WcStr, TStrV &StarStrV, const char &StarCh='*', const char &QuestCh='?') const
 
bool IsWcMatch (const TStr &WcStr, const char &StarCh, const char &QuestCh) const
 
bool IsWcMatch (const TStr &WcStr, const int &StarStrN, TStr &StarStr) const
 
bool IsWcMatch (const TStr &WcStr) const
 
TStr GetWcMatch (const TStr &WcStr, const int &StarStrN=0) const
 
TStr GetFPath () const
 
TStr GetFBase () const
 
TStr GetFMid () const
 
TStr GetFExt () const
 
void SaveTxt (const PSOut &SOut) const
 
void SaveTxt (const TStr &FNm) const
 
TStr GetStr () const
 
char * GetCStr () const
 

Static Public Member Functions

static TStr GetNrFPath (const TStr &FPath)
 
static TStr GetNrFMid (const TStr &FMid)
 
static TStr GetNrFExt (const TStr &FExt)
 
static TStr GetNrNumFExt (const int &FExtN)
 
static TStr GetNrFNm (const TStr &FNm)
 
static TStr GetNrAbsFPath (const TStr &FPath, const TStr &BaseFPath=TStr())
 
static bool IsAbsFPath (const TStr &FPath)
 
static TStr PutFExt (const TStr &FNm, const TStr &FExt)
 
static TStr PutFExtIfEmpty (const TStr &FNm, const TStr &FExt)
 
static TStr PutFBase (const TStr &FNm, const TStr &FBase)
 
static TStr PutFBaseIfEmpty (const TStr &FNm, const TStr &FBase)
 
static TStr AddToFMid (const TStr &FNm, const TStr &ExtFMid)
 
static TStr GetNumFNm (const TStr &FNm, const int &Num)
 
static TStr GetFNmStr (const TStr &Str, const bool &AlNumOnlyP=true)
 
static TStr LoadTxt (const PSIn &SIn)
 
static TStr LoadTxt (const TStr &FNm)
 
static TStrGetChStr (const char &Ch)
 
static TStrGetDChStr (const char &Ch1, const char &Ch2)
 
static TStr GetStr (const TStr &Str, const char *FmtStr)
 
static TStr GetStr (const TStr &Str, const TStr &FmtStr)
 
static TStr GetStr (const TStrV &StrV, const TStr &DelimiterStr)
 
static TStr Fmt (const char *FmtStr,...)
 
static TStr GetSpaceStr (const int &Spaces)
 
static TStr MkClone (const TStr &Str)
 
static TStr GetNullStr ()
 

Private Member Functions

 TStr (const char &Ch, bool)
 
 TStr (const char &Ch1, const char &Ch2, bool)
 
void Optimize ()
 

Static Private Member Functions

static TRStrGetRStr (const char *CStr)
 

Private Attributes

TRStrRStr
 

Friends

TStr operator+ (const TStr &LStr, const TStr &RStr)
 
TStr operator+ (const TStr &LStr, const char *RCStr)
 

Detailed Description

Definition at line 412 of file dt.h.

Constructor & Destructor Documentation

TStr::TStr ( const char &  Ch,
bool   
)
inlineprivate

Definition at line 416 of file dt.h.

References TRStr::MkRef().

416  {
417  RStr=new TRStr(Ch); RStr->MkRef();}
TRStr * RStr
Definition: dt.h:414
void MkRef()
Definition: dt.h:378
Definition: dt.h:346

Here is the call graph for this function:

TStr::TStr ( const char &  Ch1,
const char &  Ch2,
bool   
)
inlineprivate

Definition at line 418 of file dt.h.

References TRStr::MkRef().

418  {
419  RStr=new TRStr(Ch1, Ch2); RStr->MkRef();}
TRStr * RStr
Definition: dt.h:414
void MkRef()
Definition: dt.h:378
Definition: dt.h:346

Here is the call graph for this function:

TStr::TStr ( )
inline

Definition at line 423 of file dt.h.

References TRStr::GetNullRStr(), and TRStr::MkRef().

Referenced by Fmt(), GetCap(), GetChStr(), GetDChStr(), GetFExt(), GetFromHex(), GetHex(), GetLc(), GetNrFExt(), GetNrNumFExt(), GetStr(), GetSubStr(), GetTrunc(), GetUc(), GetUsFromYuAscii(), Load(), LoadTxt(), MkClone(), SplitOnAllAnyCh(), SplitOnAllCh(), SplitOnNonAlNum(), and SplitOnWs().

TRStr * RStr
Definition: dt.h:414
void MkRef()
Definition: dt.h:378
static TRStr * GetNullRStr()
Definition: dt.h:402

Here is the call graph for this function:

Here is the caller graph for this function:

TStr::TStr ( const TStr Str)
inline

Definition at line 424 of file dt.h.

References TRStr::MkRef(), and RStr.

424 {RStr=Str.RStr; RStr->MkRef();}
TRStr * RStr
Definition: dt.h:414
void MkRef()
Definition: dt.h:378

Here is the call graph for this function:

TStr::TStr ( const TChA ChA)
inline

Definition at line 425 of file dt.h.

References TChA::CStr(), GetRStr(), and TRStr::MkRef().

425 {RStr=GetRStr(ChA.CStr()); RStr->MkRef();}
TRStr * RStr
Definition: dt.h:414
char * CStr()
Definition: dt.h:255
void MkRef()
Definition: dt.h:378
static TRStr * GetRStr(const char *CStr)
Definition: dt.cpp:719

Here is the call graph for this function:

TStr::TStr ( const TSStr SStr)
inline

Definition at line 426 of file dt.h.

References TSStr::CStr(), GetRStr(), and TRStr::MkRef().

426 {RStr=GetRStr(SStr.CStr()); RStr->MkRef();}
TRStr * RStr
Definition: dt.h:414
char * CStr()
Definition: bd.h:531
void MkRef()
Definition: dt.h:378
static TRStr * GetRStr(const char *CStr)
Definition: dt.cpp:719

Here is the call graph for this function:

TStr::TStr ( const char *  CStr)
inline

Definition at line 427 of file dt.h.

References GetRStr(), and TRStr::MkRef().

427 {RStr=GetRStr(CStr); RStr->MkRef();}
TRStr * RStr
Definition: dt.h:414
void MkRef()
Definition: dt.h:378
static TRStr * GetRStr(const char *CStr)
Definition: dt.cpp:719
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

TStr::TStr ( const char &  Ch)
inlineexplicit

Definition at line 428 of file dt.h.

References GetChStr(), TRStr::MkRef(), and RStr.

428 {RStr=GetChStr(Ch).RStr; RStr->MkRef();}
TRStr * RStr
Definition: dt.h:414
void MkRef()
Definition: dt.h:378
static TStr & GetChStr(const char &Ch)
Definition: dt.cpp:1551

Here is the call graph for this function:

TStr::TStr ( const TMem Mem)
inline

Definition at line 429 of file dt.h.

References CStr(), TMem::Len(), TRStr::MkRef(), and Optimize().

429  {
430  RStr=new TRStr(Mem.Len()); RStr->MkRef();
431  memcpy(CStr(), Mem(), Mem.Len()); Optimize();}
TRStr * RStr
Definition: dt.h:414
int Len() const
Definition: dt.h:134
void Optimize()
Definition: dt.cpp:729
void MkRef()
Definition: dt.h:378
char * CStr()
Definition: dt.h:479
Definition: dt.h:346

Here is the call graph for this function:

TStr::TStr ( const PSIn SIn)
inlineexplicit

Definition at line 432 of file dt.h.

References CStr(), TSIn::GetBf(), TSIn::Len(), TRStr::MkRef(), and Optimize().

432  {
433  int SInLen=SIn->Len(); RStr=new TRStr(SInLen); RStr->MkRef();
434  SIn->GetBf(CStr(), SInLen); Optimize();}
TRStr * RStr
Definition: dt.h:414
virtual int Len() const =0
virtual int GetBf(const void *Bf, const TSize &BfL)=0
void Optimize()
Definition: dt.cpp:729
void MkRef()
Definition: dt.h:378
char * CStr()
Definition: dt.h:479
Definition: dt.h:346

Here is the call graph for this function:

TStr::~TStr ( )
inline

Definition at line 435 of file dt.h.

References TRStr::UnRef().

435 {RStr->UnRef();}
TRStr * RStr
Definition: dt.h:414
void UnRef()
Definition: dt.h:379

Here is the call graph for this function:

TStr::TStr ( TSIn SIn,
const bool &  IsSmall = false 
)
inlineexplicit

Definition at line 436 of file dt.h.

References TRStr::MkRef(), and Optimize().

436  :
437  RStr(new TRStr(SIn, IsSmall)){RStr->MkRef(); Optimize();}
TRStr * RStr
Definition: dt.h:414
void Optimize()
Definition: dt.cpp:729
void MkRef()
Definition: dt.h:378
Definition: dt.h:346

Here is the call graph for this function:

Member Function Documentation

TStr TStr::AddToFMid ( const TStr FNm,
const TStr ExtFMid 
)
static

Definition at line 1523 of file dt.cpp.

References GetFExt(), GetFMid(), and GetFPath().

1523  {
1524  return FNm.GetFPath()+FNm.GetFMid()+ExtFMid+FNm.GetFExt();
1525 }
TStr GetFMid() const
Definition: dt.cpp:1403
TStr GetFPath() const
Definition: dt.cpp:1389
TStr GetFExt() const
Definition: dt.cpp:1421

Here is the call graph for this function:

int TStr::ChangeCh ( const char &  SrcCh,
const char &  DstCh,
const int &  BChN = 0 
)

Definition at line 1107 of file dt.cpp.

References PutCh(), and SearchCh().

Referenced by GetNrFPath().

1107  {
1108  int ChN=SearchCh(SrcCh, BChN);
1109  if (ChN!=-1){PutCh(ChN, DstCh);}
1110  return ChN;
1111 }
int SearchCh(const char &Ch, const int &BChN=0) const
Definition: dt.cpp:1043
void PutCh(const int &ChN, const char &Ch)
Definition: dt.h:482

Here is the call graph for this function:

Here is the caller graph for this function:

int TStr::ChangeChAll ( const char &  SrcCh,
const char &  DstCh 
)

Definition at line 1113 of file dt.cpp.

References TRStr::CStr(), CStr(), Len(), TRStr::MkRef(), Optimize(), RStr, SearchCh(), and TRStr::UnRef().

Referenced by TCodaAnalyzer::Draw2ModeCommunity(), TMAGAffMtx::GetMtx(), and TKronMtx::GetMtx().

1113  {
1114  int FirstChN=SearchCh(SrcCh);
1115  if (FirstChN==-1){
1116  return 0;
1117  } else {
1118  TRStr* NewRStr=new TRStr(RStr->CStr());
1119  RStr->UnRef(); RStr=NewRStr; RStr->MkRef();
1120  char* ThisBf=CStr(); int StrLen=Len(); int Changes=0;
1121  for (int ChN=FirstChN; ChN<StrLen; ChN++){
1122  // slow: if (GetCh(ChN)==SrcCh){RStr->PutCh(ChN, DstCh); Changes++;}
1123  if (ThisBf[ChN]==SrcCh){ThisBf[ChN]=DstCh; Changes++;}
1124  }
1125  Optimize();
1126  return Changes;
1127  }
1128 }
int SearchCh(const char &Ch, const int &BChN=0) const
Definition: dt.cpp:1043
TRStr * RStr
Definition: dt.h:414
int Len() const
Definition: dt.h:490
const char * CStr() const
Definition: dt.h:381
void UnRef()
Definition: dt.h:379
void Optimize()
Definition: dt.cpp:729
void MkRef()
Definition: dt.h:378
char * CStr()
Definition: dt.h:479
Definition: dt.h:346

Here is the call graph for this function:

Here is the caller graph for this function:

int TStr::ChangeStr ( const TStr SrcStr,
const TStr DstStr,
const int &  BChN = 0 
)

Definition at line 1130 of file dt.cpp.

References DelSubStr(), InsStr(), Len(), and SearchStr().

Referenced by ChangeStrAll(), and TFile::GetUniqueFNm().

1130  {
1131  int ChN=SearchStr(SrcStr, BChN);
1132  if (ChN==-1){
1133  return -1;
1134  } else {
1135  DelSubStr(ChN, ChN+SrcStr.Len()-1);
1136  InsStr(ChN, DstStr);
1137  return ChN;
1138  }
1139 }
int Len() const
Definition: dt.h:490
int SearchStr(const TStr &Str, const int &BChN=0) const
Definition: dt.cpp:1065
void DelSubStr(const int &BChN, const int &EChN)
Definition: dt.cpp:850
void InsStr(const int &BChN, const TStr &Str)
Definition: dt.cpp:825

Here is the call graph for this function:

Here is the caller graph for this function:

int TStr::ChangeStrAll ( const TStr SrcStr,
const TStr DstStr,
const bool &  FromStartP = false 
)

Definition at line 1141 of file dt.cpp.

References ChangeStr(), and Len().

Referenced by TGnuPlot::AddPlot(), TGnuPlot::CreatePlotFile(), TXmlLx::GetChRefFromYuEntRef(), GetNrAbsFPath(), TXmlLx::GetUsAsciiStrFromXmlStr(), TUnicode::NormalizeCodecName(), and TUrl::TUrl().

1141  {
1142  const int DstStrLen=DstStr.Len();
1143  int Changes=0-1; int BChN=0-DstStrLen;
1144  do {
1145  Changes++;
1146  if (FromStartP){BChN=0-DstStrLen;}
1147  BChN+=DstStrLen;
1148  BChN=ChangeStr(SrcStr, DstStr, BChN);
1149  } while (BChN!=-1);
1150  return Changes;
1151 }
int Len() const
Definition: dt.h:490
int ChangeStr(const TStr &SrcStr, const TStr &DstStr, const int &BChN=0)
Definition: dt.cpp:1130

Here is the call graph for this function:

Here is the caller graph for this function:

void TStr::Clr ( )
inline

Definition at line 489 of file dt.h.

References TRStr::GetNullRStr(), TRStr::MkRef(), and TRStr::UnRef().

Referenced by DelSubStr(), TUrl::GetAbs(), THttpResp::ParseHttpResp(), and TUrl::ToLcPath().

TRStr * RStr
Definition: dt.h:414
void UnRef()
Definition: dt.h:379
void MkRef()
Definition: dt.h:378
static TRStr * GetNullRStr()
Definition: dt.h:402

Here is the call graph for this function:

Here is the caller graph for this function:

int TStr::CmpI ( const TStr Str) const
inline

Definition at line 497 of file dt.h.

References TRStr::CmpI(), and CStr().

497 {return TRStr::CmpI(CStr(), Str.CStr());}
static int CmpI(const char *CStr1, const char *CStr2)
Definition: dt.cpp:699
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

TStr & TStr::ConvUsFromYuAscii ( )

Definition at line 779 of file dt.cpp.

References TRStr::ConvUsFromYuAscii(), TRStr::CStr(), TRStr::MkRef(), Optimize(), RStr, and TRStr::UnRef().

779  {
780  TRStr* NewRStr=new TRStr(RStr->CStr()); NewRStr->ConvUsFromYuAscii();
781  RStr->UnRef(); RStr=NewRStr; RStr->MkRef();
782  Optimize(); return *this;
783 }
TRStr * RStr
Definition: dt.h:414
const char * CStr() const
Definition: dt.h:381
void UnRef()
Definition: dt.h:379
void Optimize()
Definition: dt.cpp:729
void MkRef()
Definition: dt.h:378
void ConvUsFromYuAscii()
Definition: dt.cpp:693
Definition: dt.h:346

Here is the call graph for this function:

int TStr::CountCh ( const char &  Ch,
const int &  BChN = 0 
) const

Definition at line 1033 of file dt.cpp.

References CStr(), TInt::GetMx(), and Len().

1033  {
1034  const int ThisLen=Len();
1035  const char* ThisBf=CStr();
1036  int Chs=0;
1037  for (int ChN=TInt::GetMx(BChN, 0); ChN<ThisLen; ChN++){
1038  if (ThisBf[ChN]==Ch){Chs++;}
1039  }
1040  return Chs;
1041 }
int Len() const
Definition: dt.h:490
static int GetMx(const int &Int1, const int &Int2)
Definition: dt.h:1185
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

char* TStr::CStr ( )
inline

Definition at line 479 of file dt.h.

References TRStr::CStr().

Referenced by TStrHash< TInt, TBigStrPool >::AddDat(), TStrHash< TInt, TBigStrPool >::AddDatId(), TGnuPlot::AddErrBar(), TNEANet::AddFltVAttrDatE(), TNEANet::AddFltVAttrDatN(), TGnuPlot::AddFunc(), TNEANet::AddIntVAttrDatE(), TNEANet::AddIntVAttrDatN(), TStrHash< TInt, TBigStrPool >::AddKey(), TGnuPlot::AddPlot(), TBigStrPool::AddStr(), TStrPool::AddStr(), TStrPool64::AddStr(), TNEANet::AppendFltVAttrDatE(), TNEANet::AppendFltVAttrDatN(), TNEANet::AppendIntVAttrDatE(), TNEANet::AppendIntVAttrDatN(), anonymous_namespace{unicode.cpp}::AssertEq(), TKroneckerLL::ChainGelmapRubinPlot(), ChangeChAll(), CmpI(), TTable::CompareRows(), CountCh(), TGnuPlot::CreatePlotFile(), TZipIn::CreateZipProcess(), TZipOut::CreateZipProcess(), TFile::Del(), TMMNet::DelCrossNet(), TDir::DelDir(), TMMNet::DelModeNet(), DelSubStr(), TCodaAnalyzer::Draw2ModeCommunity(), TGHash< TDat >::DrawGViz(), TLocClust::DrawWhiskers(), TMAGAffMtx::Dump(), TKronMtx::Dump(), TCnCom::Dump(), TBigNet< TNodeData, IsDir >::Dump(), TSimpleGraph::Dump(), TCodaAnalyzer::Dump2ModeCommunities(), TAGMUtil::DumpCmtyVV(), TCoda::DumpMemberships(), TCesnaUtil::DumpNIDAttrHToMetis(), TCesnaUtil::DumpNIDAttrHToNIDK(), TTimeNENet::DumpTimeStat(), EqI(), ErrNotify(), TDir::Exists(), FPrintMatrix(), FPrintNodeMappings(), FPrintRoles(), TDir::GenDir(), TZipIn::GetCmd(), TZipOut::GetCmd(), GetCStr(), TBigStrPool::GetCStr(), TStrPool::GetCStr(), TBigStrPool::GetCStrFromOffset(), TExeTm::GetCurTm(), TStrHash< TInt, TBigStrPool >::GetDat(), TSecTm::GetDtStr(), GetFBase(), GetFExt(), TZipIn::GetFLen(), GetFMid(), GetFPath(), TEnv::GetIfArgPrefixBool(), TEnv::GetIfArgPrefixFlt(), TEnv::GetIfArgPrefixInt(), TEnv::GetIfArgPrefixStr(), TEnv::GetIfArgPrefixStrV(), TStrHash< TInt, TBigStrPool >::GetKeyId(), TKronMtx::GetMtxFromNm(), TStrHashF_OldGLib::GetPrimHashCd(), TStrHashF_DJB::GetPrimHashCd(), TILx::GetQStr(), TStrHashF_OldGLib::GetSecHashCd(), TStrHashF_DJB::GetSecHashCd(), TSecTm::GetStr(), TMom::GetStr(), GetStr(), TInt::GetStr(), TUInt::GetStr(), TFlt::GetStr(), TLFlt::GetStr(), GetSubStr(), TSecTm::GetTmSec(), THtmlDoc::GetTxtLnDoc(), TUInt::GetUIntFromIpStr(), TEnv::GetVarVal(), TStrUtil::GetXmlTagVal(), TKroneckerLL::GradDescentConvergence(), TAGMUtil::GVizComGraph(), TSnap::TSnapDetail::GVizDoLayout(), TGStatVec::ImposeDistr(), TLocClustStat::ImposeNCP(), InfoNotify(), TUniChDb::InitDerivedCoreProperties(), TUniChDb::InitPropList(), TUniChDb::InitScripts(), TUniChDb::InitWordAndSentenceBoundaryFlags(), TSnap::Intersect(), TSnap::Intersect1(), TBigNet< TNodeData, IsDir >::InvertFromSources(), TEnv::IsArgStr(), IsFlt(), TStrHash< TInt, TBigStrPool >::IsKey(), TStrHash< TInt, TBigStrPool >::IsKeyGetDat(), TNGraphMP::IsOk(), TNodeNet< TNodeData >::IsOk(), TUNGraph::IsOk(), TNEANetMP::IsOk(), TNGraph::IsOk(), TNodeEDatNet< TNodeData, TEdgeData >::IsOk(), TNEGraph::IsOk(), TBPGraph::IsOk(), TNodeEdgeNet< TNodeData, TEdgeData >::IsOk(), TNEANet::IsOk(), TUndirNet::IsOk(), TDirNet::IsOk(), TChA::IsPrefix(), IsPrefix(), TChA::IsSuffix(), IsSuffix(), TTable::Join(), LeftOf(), LeftOfLast(), TTimeNet::LoadAmazon(), TTimeNet::LoadArxiv(), TTimeNet::LoadBipartite(), TKeyDatFl< TKey, TDat, THashFunc >::LoadDatV(), TTimeNENet::LoadEdgeTm(), TTimeNENet::LoadFlickr(), TKeyDatFl< TKey, TDat, THashFunc >::LoadHash(), TKeyDatFl< TKey, TDat, THashFunc >::LoadKeyV(), TCesnaUtil::LoadNIDAttrHFromNIDKH(), TTimeNet::LoadPatents(), TMAGNodeSimple::LoadTxt(), TMAGNodeBern::LoadTxt(), TMAGNodeBeta::LoadTxt(), TMAGParam< TNodeAttr >::LoadTxt(), TUniCaseFolding::LoadTxt(), TUniChDb::LoadTxt(), MkClone(), TCesna::MLEGradAscentParallel(), TNumericalStuff::nrerror(), TNativeCallbackNotify::OnNotify(), TStdNotify::OnNotify(), TStdErrNotify::OnNotify(), TNativeCallbackNotify::OnStatus(), TStdNotify::OnStatus(), TStdErrNotify::OnStatus(), TLogNotify::OnStatus(), TUniChDb::TUcdFileReader::Open(), operator!=(), TGStat::TCmpByVal::operator()(), TWChA::operator+=(), TMem::operator+=(), TChA::operator+=(), operator+=(), TWChA::operator=(), TChA::operator=(), TVecPool< TVal, TSizeTy >::operator=(), operator==(), Optimize(), TGStat::Plot(), TGStatVec::Plot(), PlotAutoCorrelation(), TLocClustStat::PlotBestClustDens(), TLocClustStat::PlotBoltzmanCurve(), TTimeNet::PlotCCfOverTm(), TSnap::PlotClustCf(), TKronMtx::PlotCmpGraphs(), TLocClust::PlotCutDistr(), TTimeNet::PlotEffDiam(), TTimeNENet::PlotEffDiam(), TSnap::PlotEigValDistr(), TSnap::PlotEigValRank(), TForestFire::PlotFire(), TFfGGen::PlotFireSize(), PlotGrad(), TSnap::PlotHops(), TSnap::PlotInDegDistr(), TSnap::PlotInvParticipRat(), TSnap::PlotKCoreEdges(), TSnap::PlotKCoreNodes(), TTimeNet::PlotMedianDegOverTm(), TTimeNet::PlotMissingPast(), TTimeNENet::PlotMissingPast(), TLocClustStat::PlotNCP(), TLocClustStat::PlotNCPModul(), TLocClustStat::PlotNCPScatter(), TLocClustStat::PlotNcpTop10(), TSnap::PlotOutDegDistr(), TLocClust::PlotPhiDistr(), TLocClustStat::PlotPhiDistr(), TLocClustStat::PlotPhiInOut(), PlotRoles(), TSnap::PlotSccDistr(), TSnap::PlotShortPathDistr(), TSnap::PlotSngValDistr(), TSnap::PlotSngValRank(), TSnap::PlotSngVec(), PlotTrueAndEst(), TGnuPlot::PlotValOverTm(), TGnuPlot::PlotValV(), TLocClust::PlotVolDistr(), TSnap::PlotWccDistr(), TEnv::PrepArgs(), TUniChDb::PrintCharNames(), TSnap::PrintInfo(), TTmProfiler::PrintReport(), TLAMisc::PrintTFltV(), TLAMisc::PrintTFltVV(), TLAMisc::PrintTIntV(), TSOut::PutStr(), TFRnd::PutStr(), TEnv::PutVarVal(), TFile::Rename(), TVec< TVal, TSizeTy >::Resize(), TVecPool< TVal, TSizeTy >::Resize(), RightOf(), RightOfLast(), TGnuPlot::RunGnuPlot(), TAGMUtil::SaveBipartiteGephi(), TGHash< TDat >::SaveDetailTxt(), TNetInfBs::SaveEdgeInfo(), TSnap::SaveEdgeList(), TSnap::SaveEdgeListNet(), TTimeNENet::SaveEdgeTm(), TGnuPlot::SaveEps(), TAGMUtil::SaveGephi(), TSnap::SaveGViz(), TGraphKey::SaveGViz(), THtmlDoc::SaveHtmlToXml(), TSnap::SaveMatlabSparseMtx(), TSnap::SavePajek(), TLocClust::SavePajek(), TNetInfBs::SavePajek(), TNetInfBs::SavePlaneTextNet(), TGnuPlot::SavePng(), TTable::SaveSS(), TGnuPlot::SaveTs(), TKronMtx::SaveTxt(), TCnCom::SaveTxt(), TMAGParam< TNodeAttr >::SaveTxt(), TGStatVec::SaveTxt(), TNcpGraphsBase::SaveTxt(), TGHash< TDat >::SaveTxt(), SaveTxt(), TLocClustStat::SaveTxtInfo(), TNcpGraphsBase::SaveTxtNcpMin(), SearchCh(), SearchChBack(), TChA::SearchStr(), SearchStr(), SplitOnAllAnyCh(), SplitOnAllCh(), SplitOnCh(), SplitOnLastCh(), SplitOnNonAlNum(), SplitOnWs(), StatNotify(), TGStat::TakeStat(), TChA::TChA(), TUniCodec::TestDecodeUtf16(), TUniCodec::TestDecodeUtf8(), TUniChDb::TestFindNextWordOrSentenceBoundary(), TKroneckerLL::TestGradDescent(), TKroneckerLL::TestSamplePerm(), TUniCodec::TestUtf16(), TUniCodec::TestUtf8(), TUniChDb::TestWbFindNonIgnored(), TFIn::TFIn(), TFInOut::TFInOut(), TFOut::TFOut(), TTable::ThresholdJoinInputCorrectness(), TTimeNENet::TimeGrowth(), TMem::TMem(), TMIn::TMIn(), TNcpGraphsBase::TNcpGraphsBase(), ToTrunc(), TShMIn::TShMIn(), TSparseRowMatrix::TSparseRowMatrix(), TStr(), TVecPool< TVal, TSizeTy >::TVecPool(), TWChA::TWChA(), TZipIn::TZipIn(), TFPathNotify::UpdateSOut(), WarnNotify(), TSnap::WriteEdgeSchemaToFile(), TSnap::WriteEdgesToFile(), TSnap::WriteNodeSchemaToFile(), TSnap::WriteNodesToFile(), and TUniChDb::TSubcatHelper::~TSubcatHelper().

479 {return RStr->CStr();}
TRStr * RStr
Definition: dt.h:414
const char * CStr() const
Definition: dt.h:381

Here is the call graph for this function:

Here is the caller graph for this function:

const char* TStr::CStr ( ) const
inline

Definition at line 480 of file dt.h.

References TRStr::CStr().

480 {return RStr->CStr();}
TRStr * RStr
Definition: dt.h:414
const char * CStr() const
Definition: dt.h:381

Here is the call graph for this function:

void TStr::DelChAll ( const char &  Ch)

Definition at line 840 of file dt.cpp.

References TChA::Del(), and TChA::SearchCh().

840  {
841  TChA ChA(*this);
842  int ChN=ChA.SearchCh(Ch);
843  while (ChN!=-1){
844  ChA.Del(ChN);
845  ChN=ChA.SearchCh(Ch);
846  }
847  *this=ChA;
848 }
Definition: dt.h:201

Here is the call graph for this function:

bool TStr::DelStr ( const TStr Str)

Definition at line 863 of file dt.cpp.

References DelSubStr(), Len(), and SearchStr().

Referenced by TUrl::GetAbsFromBase().

863  {
864  int ChN=SearchStr(Str);
865  if (ChN==-1){
866  return false;
867  } else {
868  DelSubStr(ChN, ChN+Str.Len()-1);
869  return true;
870  }
871 }
int Len() const
Definition: dt.h:490
int SearchStr(const TStr &Str, const int &BChN=0) const
Definition: dt.cpp:1065
void DelSubStr(const int &BChN, const int &EChN)
Definition: dt.cpp:850

Here is the call graph for this function:

Here is the caller graph for this function:

void TStr::DelSubStr ( const int &  BChN,
const int &  EChN 
)

Definition at line 850 of file dt.cpp.

References Clr(), CStr(), TInt::GetMn(), TInt::GetMx(), and Len().

Referenced by ChangeStr(), DelStr(), TUrl::GetAbsFromBase(), and TEnv::GetIfArgPrefixBool().

850  {
851  int BChN=TInt::GetMx(_BChN, 0);
852  int EChN=TInt::GetMn(_EChN, Len()-1);
853  int Chs=Len()-(EChN-BChN+1);
854  if (Chs==0){Clr();}
855  else if (Chs<Len()){
856  char* Bf=new char[Chs+1]; strncpy(Bf, CStr(), BChN);
857  strncpy(Bf+BChN, CStr()+EChN+1, Len()-EChN-1); Bf[Chs]=0;
858  TStr Str(Bf); delete[] Bf;
859  *this=Str;
860  }
861 }
int Len() const
Definition: dt.h:490
static int GetMx(const int &Int1, const int &Int2)
Definition: dt.h:1185
void Clr()
Definition: dt.h:489
static int GetMn(const int &Int1, const int &Int2)
Definition: dt.h:1183
Definition: dt.h:412
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::Empty ( ) const
inline

Definition at line 491 of file dt.h.

References TRStr::Empty().

Referenced by TGnuPlot::AddExpFit(), TGnuPlot::AddFunc(), TGnuPlot::AddLinFit(), TGnuPlot::AddLogFit(), TGnuPlot::AddPwrFit1(), TGnuPlot::AddPwrFit2(), TGnuPlot::AddPwrFit3(), TXmlObjSer::AssertXmlHd(), TGnuPlot::CreatePlotFile(), TUrl::DefFinalUrl(), TMAGAffMtx::Dump(), TKronMtx::Dump(), TCnCom::Dump(), TBigNet< TNodeData, IsDir >::Dump(), TSimpleGraph::Dump(), TDbStr::Empty(), TFile::Exists(), TDbStr::Filled(), TCesna::FindComs(), TAGMFast::FindComsByCV(), TCoda::FindComsByCV(), TUrl::GetAbs(), TUrl::GetAbsFromBase(), THttpResp::GetCookieKeyValDmPathQuV(), TSs::GetFldX(), TSs::GetFldY(), GetNrAbsFPath(), TGBlobBs::GetNrBlobBsFNm(), GetNrFExt(), TXmlLx::GetPEReference(), TXmlLx::GetReference(), TGnuPlot::GetSeriesPlotStr(), THttpLx::GetSpec(), TXmlObjSer::GetTagNm(), TXmlTok::GetTagTok(), TXmlDoc::GetTagTok(), THttpLx::GetToken(), TKroneckerLL::GradDescentConvergence(), TGStatVec::ImposeDistr(), TLocClustStat::ImposeNCP(), TUniChDb::InitSpecialCasing(), TEnv::IsEndOfRun(), TTable::IsNextK(), TUrl::IsSite(), THtmlTok::IsUrlTok(), TUniChDb::LoadTxt(), TUniChDb::LoadTxt_ProcessDecomposition(), TAGMFast::MLEGradAscent(), TCoda::MLEGradAscent(), TCesna::MLEGradAscent(), TAGMFit::MLEGradAscentGivenCAG(), TAGMFast::MLEGradAscentParallel(), TCoda::MLEGradAscentParallel(), TCesna::MLEGradAscentParallel(), TLogRegFit::MLEGradient(), TAGMFast::MLENewton(), TLogRegFit::MLENewton(), TStdNotify::OnStatus(), TStdErrNotify::OnStatus(), operator+(), TTable::Order(), TGStat::Plot(), TGStatVec::Plot(), TLocClustStat::PlotBestClustDens(), TTimeNet::PlotCCfOverTm(), TSnap::PlotClustCf(), TLocClust::PlotCutDistr(), TSnap::PlotEigValDistr(), TSnap::PlotEigValRank(), TSnap::PlotHops(), TSnap::PlotInDegDistr(), TSnap::PlotInvParticipRat(), TSnap::PlotKCoreEdges(), TSnap::PlotKCoreNodes(), TLocClustStat::PlotNCP(), TLocClustStat::PlotNCPModul(), TLocClustStat::PlotNCPScatter(), TLocClustStat::PlotNcpTop10(), TSnap::PlotOutDegDistr(), TLocClust::PlotPhiDistr(), TSnap::PlotSccDistr(), TSnap::PlotShortPathDistr(), TSnap::PlotSngValDistr(), TSnap::PlotSngValRank(), TSnap::PlotSngVec(), TLocClust::PlotVolDistr(), TSnap::PlotWccDistr(), TEnv::PrepArgs(), TSnap::PrintInfo(), PutFBaseIfEmpty(), PutFExtIfEmpty(), TGnuPlot::RunGnuPlot(), TSnap::SaveEdgeList(), TSnap::SaveEdgeListNet(), TGnuPlot::SaveEps(), TSnap::SaveGViz(), TGraphKey::SaveGViz(), THtmlDoc::SaveHtmlToXml(), TGnuPlot::SavePng(), TGnuPlot::SaveTs(), TCnCom::SaveTxt(), SaveXml(), TFFile::TFFile(), TFIn::TFIn(), TGnuPlot::TGnuPlot(), THttpResp::THttpResp(), THttpRq::THttpRq(), TMIn::TMIn(), TUrl::ToLcPath(), TPreproc::TPreproc(), TShMIn::TShMIn(), TXmlObjSerTagNm::TXmlObjSerTagNm(), TZipIn::TZipIn(), TZipOut::TZipOut(), and TXmlObjSerTagNm::~TXmlObjSerTagNm().

491 {return RStr->Empty();}
TRStr * RStr
Definition: dt.h:414
bool Empty() const
Definition: dt.h:383

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::EqI ( const TStr Str) const
inline

Definition at line 498 of file dt.h.

References TRStr::CmpI(), and CStr().

498 {return TRStr::CmpI(CStr(), Str.CStr())==0;}
static int CmpI(const char *CStr1, const char *CStr2)
Definition: dt.cpp:699
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

TStr TStr::Fmt ( const char *  FmtStr,
  ... 
)
static

Definition at line 1599 of file dt.cpp.

References GetNullStr(), and TStr().

Referenced by TNGraphMP::AddEdge(), TNodeNet< TNodeData >::AddEdge(), TUNGraph::AddEdge(), TNEANetMP::AddEdge(), TNGraph::AddEdge(), TNodeEDatNet< TNodeData, TEdgeData >::AddEdge(), TNEGraph::AddEdge(), TBPGraph::AddEdge(), TNodeEdgeNet< TNodeData, TEdgeData >::AddEdge(), TNEANet::AddEdge(), TUndirNet::AddEdge(), TDirNet::AddEdge(), TJsonVal::AddEscapeChAFromStr(), TGnuPlot::AddExpFit(), TNEANet::AddFltVAttrDatE(), TNEANet::AddFltVAttrDatN(), TGnuPlot::AddFunc(), TNEANet::AddIntVAttrDatE(), TNEANet::AddIntVAttrDatN(), TGnuPlot::AddLinFit(), TGnuPlot::AddLogFit(), TBigNet< TNodeData, IsDir >::AddNode(), TNGraphMP::AddNode(), TNodeNet< TNodeData >::AddNode(), TUNGraph::AddNode(), TNEANetMP::AddNode(), TNGraph::AddNode(), TNodeEDatNet< TNodeData, TEdgeData >::AddNode(), TNEGraph::AddNode(), TBPGraph::AddNode(), TNodeEdgeNet< TNodeData, TEdgeData >::AddNode(), TNEANet::AddNode(), TUndirNet::AddNode(), TDirNet::AddNode(), TGnuPlot::AddPwrFit1(), TGnuPlot::AddPwrFit2(), TGnuPlot::AddPwrFit3(), TBigNet< TNodeData, IsDir >::AddUndirNode(), TNEANet::AppendFltVAttrDatE(), TNEANet::AppendFltVAttrDatN(), TNEANet::AppendIntVAttrDatE(), TNEANet::AppendIntVAttrDatN(), TKroneckerLL::ChainGelmapRubinPlot(), TZipIn::CreateZipProcess(), TZipOut::CreateZipProcess(), TMMNet::DelCrossNet(), TNGraphMP::DelEdge(), TNodeNet< TNodeData >::DelEdge(), TUNGraph::DelEdge(), TNGraph::DelEdge(), TNodeEDatNet< TNodeData, TEdgeData >::DelEdge(), TBPGraph::DelEdge(), TUndirNet::DelEdge(), TDirNet::DelEdge(), TMMNet::DelModeNet(), TUNGraph::DelNode(), TBPGraph::DelNode(), TUndirNet::DelNode(), TLinAlg::DotProduct(), TGHash< TDat >::DrawGViz(), TLocClust::DrawWhiskers(), TCodaAnalyzer::Dump2ModeCommunities(), TCoda::DumpMemberships(), TCesnaUtil::DumpNIDAttrHToNIDK(), TSsParserMP::DumpStr(), TSsParser::DumpStr(), TUnicode::EncodeUtf8(), TZipIn::FillBf(), TAGMUtil::FindComsByAGM(), TFfGGen::GenFFGraphs(), TSnap::GenRndGnm(), TSnap::GenSmallWorld(), TJsonVal::GetChAFromVal(), TZipIn::GetCmd(), TZipOut::GetCmd(), TSecTm::GetDtMdyStr(), TSecTm::GetDtStr(), TSecTm::GetDtYmdStr(), TBPGraph::GetEI(), TZipIn::GetFLen(), TFlt::GetGigaStr(), TNum< int64 >::GetHexStr(), TUInt64::GetHexStr(), TBigNet< TNodeData, IsDir >::GetInNIdV(), TSsParserMP::GetInt(), TSsParser::GetInt(), TFlt::GetKiloStr(), TFlt::GetMegaStr(), TKronMtx::GetMtxFromNm(), TMAGAffMtx::GetMtxStr(), TKronMtx::GetMtxStr(), TMemIn::GetNextLnBf(), TStdIn::GetNextLnBf(), TChAIn::GetNextLnBf(), TFInOut::GetNextLnBf(), TMIn::GetNextLnBf(), TStrIn::GetNextLnBf(), TFfGGen::GetParamStr(), TSecTm::GetStr(), TTuple< TVal, NVals >::GetStr(), TNum< int64 >::GetStr(), TInt::GetStr(), TUInt64::GetStr(), TUInt::GetStrFromIpUInt(), TXmlParser::GetTag(), TXmlParser::GetTagVal(), TGnuPlot::GetTics42(), TSecTm::GetTmMinStr(), TSecTm::GetTmSec(), TSecTm::GetTmStr(), TUInt::GetUIntFromIpStr(), TFile::GetUniqueFNm(), TSecTm::GetYmdTmStr(), TSecTm::GetYmdTmStr2(), TKroneckerLL::GradDescentConvergence(), TAGMUtil::GVizComGraph(), TSnap::TSnapDetail::GVizDoLayout(), TGStatVec::ImposeDistr(), TLocClustStat::ImposeNCP(), TGraphAnf< PGraph >::InitAnfBits(), TBigNet< TNodeData, IsDir >::IsOk(), TNGraphMP::IsOk(), TNodeNet< TNodeData >::IsOk(), TUNGraph::IsOk(), TNEANetMP::IsOk(), TNGraph::IsOk(), TNodeEDatNet< TNodeData, TEdgeData >::IsOk(), TNEGraph::IsOk(), TBPGraph::IsOk(), TNodeEdgeNet< TNodeData, TEdgeData >::IsOk(), TNEANet::IsOk(), TUndirNet::IsOk(), TDirNet::IsOk(), TSparseSVD::Lanczos(), TCesnaUtil::LoadNIDAttrHFromNIDKH(), TSs::LoadTxt(), TAGMFast::MLENewton(), TLogNotify::OnStatus(), TGStat::TCmpByVal::operator()(), TStrPool::operator=(), TVecPool< TVal, TSizeTy >::operator=(), TGLib_OLD::TVecPool< TVal >::operator=(), TLocClustStat::ParamStr(), TGStat::Plot(), TGStatVec::Plot(), PlotAutoCorrelation(), TLocClustStat::PlotBestClustDens(), TLocClustStat::PlotBoltzmanCurve(), TTimeNet::PlotCCfOverTm(), TSnap::PlotClustCf(), TKronMtx::PlotCmpGraphs(), TLocClust::PlotCutDistr(), TTimeNet::PlotEffDiam(), TTimeNENet::PlotEffDiam(), TSnap::PlotEigValDistr(), TSnap::PlotEigValRank(), TForestFire::PlotFire(), TFfGGen::PlotFireSize(), PlotGrad(), TSnap::PlotHops(), TSnap::PlotInDegDistr(), TSnap::PlotInvParticipRat(), TSnap::PlotKCoreEdges(), TSnap::PlotKCoreNodes(), TTimeNet::PlotMedianDegOverTm(), TTimeNet::PlotMissingPast(), TLocClustStat::PlotNCP(), TLocClustStat::PlotNCPModul(), TLocClustStat::PlotNCPScatter(), TLocClustStat::PlotNcpTop10(), TSnap::PlotOutDegDistr(), TLocClust::PlotPhiDistr(), TLocClustStat::PlotPhiDistr(), TLocClustStat::PlotPhiInOut(), TSnap::PlotSccDistr(), TSnap::PlotShortPathDistr(), TSnap::PlotSngValDistr(), TSnap::PlotSngValRank(), TSnap::PlotSngVec(), TGnuPlot::PlotValV(), TLocClust::PlotVolDistr(), TSnap::PlotWccDistr(), TAGMFast::Prediction(), TCoda::Prediction(), TCesna::Prediction(), TEnv::PutVarVal(), TVec< TVal, TSizeTy >::Resize(), TBigStrPool::Resize(), TStrPool::Resize(), TStrPool64::Resize(), TVecPool< TVal, TSizeTy >::Resize(), TGLib_OLD::TVecPool< TVal >::Resize(), TGnuPlot::RunGnuPlot(), TAGMFit::RunMCMC(), TNetInfBs::SaveCascades(), TNIBs::SaveCascades(), TGnuPlot::SaveEps(), TNetInfBs::SaveGroundTruth(), TNIBs::SaveGroundTruth(), TNIBs::SaveGroundTruthPajek(), TNIBs::SaveInferred(), TNIBs::SaveInferredEdges(), TNIBs::SaveInferredPajek(), TLAMisc::SaveMatlabTFltIntKdV(), TSnap::SavePajek(), TLocClust::SavePajek(), TGnuPlot::SavePng(), TNIBs::SaveSites(), THist::SaveStat(), TMAGNodeSimple::SaveTxt(), TMAGNodeBern::SaveTxt(), TMAGNodeBeta::SaveTxt(), TGStatVec::SaveTxt(), TLocClustStat::SaveTxtInfo(), TNcpGraphsBase::SaveTxtNcpMin(), TNodeEDatNet< TNodeData, TEdgeData >::SetEDat(), TNodeEdgeNet< TNodeData, TEdgeData >::SetEDat(), TNodeNet< TNodeData >::SetNDat(), TNodeEDatNet< TNodeData, TEdgeData >::SetNDat(), TNodeEdgeNet< TNodeData, TEdgeData >::SetNDat(), TKroneckerLL::TestGradDescent(), TKroneckerLL::TestSamplePerm(), TFullColMatrix::TFullColMatrix(), TTimeNENet::TimeGrowth(), TNcpGraphsBase::TNcpGraphsBase(), TStrPool::TStrPool(), TVecPool< TVal, TSizeTy >::TVecPool(), TGLib_OLD::TVecPool< TVal >::TVecPool(), TZipIn::TZipIn(), TFPathNotify::UpdateSOut(), and TStrPool::~TStrPool().

1599  {
1600  char Bf[10*1024];
1601  va_list valist;
1602  va_start(valist, FmtStr);
1603  const int RetVal=vsnprintf(Bf, 10*1024-2, FmtStr, valist);
1604  va_end(valist);
1605  return RetVal!=-1 ? TStr(Bf) : TStr::GetNullStr();
1606 }
static TStr GetNullStr()
Definition: dt.cpp:1626
Definition: dt.h:412
TStr()
Definition: dt.h:423

Here is the call graph for this function:

Here is the caller graph for this function:

TStr & TStr::FromHex ( )

Definition at line 798 of file dt.cpp.

References TRStr::Bf, TCh::GetHex(), IAssert, Len(), and RStr.

798  {
799  int StrLen=Len(); IAssert(StrLen%2==0);
800  TChA ChA; int ChN=0;
801  while (ChN<StrLen){
802  char MshCh=RStr->Bf[ChN]; ChN++;
803  char LshCh=RStr->Bf[ChN]; ChN++;
804  uchar Ch=uchar(TCh::GetHex(MshCh)*16+TCh::GetHex(LshCh));
805  ChA+=Ch;
806  }
807  *this=ChA;
808  return *this;
809 }
#define IAssert(Cond)
Definition: bd.h:262
TRStr * RStr
Definition: dt.h:414
int Len() const
Definition: dt.h:490
static int GetHex(const char &Ch)
Definition: dt.h:1072
char * Bf
Definition: dt.h:348
unsigned char uchar
Definition: bd.h:10
Definition: dt.h:201

Here is the call graph for this function:

TStr TStr::GetCap ( ) const
inline

Definition at line 505 of file dt.h.

References TStr().

505 {return TStr(*this).ToCap();}
TStr()
Definition: dt.h:423

Here is the call graph for this function:

char TStr::GetCh ( const int &  ChN) const
inline

Definition at line 486 of file dt.h.

References TRStr::GetCh().

Referenced by TSnap::CmtyEvolutionFileBatch(), TTable::DenormalizeColName(), TLxChDef::GetUcStr(), TUrlLxChDef::InclStr(), TLxChDef::IsNmStr(), IsWcMatch(), LastCh(), TTable::NormalizeColName(), and TTable::RenumberColName().

486 {return RStr->GetCh(ChN);}
TRStr * RStr
Definition: dt.h:414
char GetCh(const int &ChN) const
Definition: dt.h:388

Here is the call graph for this function:

Here is the caller graph for this function:

TStr & TStr::GetChStr ( const char &  Ch)
static

Definition at line 1551 of file dt.cpp.

References TVec< TVal, TSizeTy >::Empty(), TVec< TVal, TSizeTy >::Gen(), and TStr().

Referenced by operator=(), and TStr().

1551  {
1552  static char MnCh=char(CHAR_MIN);
1553  static char MxCh=char(CHAR_MAX);
1554  static int Chs=int(MxCh)-int(MnCh)+1;
1555  static TStrV ChStrV;
1556  if (ChStrV.Empty()){
1557  ChStrV.Gen(Chs);
1558  for (int ChN=0; ChN<Chs; ChN++){
1559  ChStrV[ChN]=TStr(char(MnCh+ChN), true);}
1560  }
1561  return ChStrV[int(Ch-MnCh)];
1562 }
bool Empty() const
Tests whether the vector is empty.
Definition: ds.h:570
void Gen(const TSizeTy &_Vals)
Constructs a vector (an array) of _Vals elements.
Definition: ds.h:523
TStr()
Definition: dt.h:423

Here is the call graph for this function:

Here is the caller graph for this function:

char* TStr::GetCStr ( ) const
inline

Definition at line 688 of file dt.h.

References CStr(), and Len().

Referenced by TMAGFitBern::SaveTxt().

688  {
689  char* Bf=new char[Len()+1]; strcpy(Bf, CStr()); return Bf;}
int Len() const
Definition: dt.h:490
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

Here is the caller graph for this function:

TStr & TStr::GetDChStr ( const char &  Ch1,
const char &  Ch2 
)
static

Definition at line 1564 of file dt.cpp.

References TVVec< TVal, TSizeTy >::At(), TVVec< TVal, TSizeTy >::Empty(), Fail, TVVec< TVal, TSizeTy >::Gen(), TCh::Mn, TStr(), and TCh::Vals.

1564  {
1565  Fail; // temporary
1566  static TStrVV DChStrVV;
1567  if (DChStrVV.Empty()){
1568  DChStrVV.Gen(TCh::Vals, TCh::Vals);
1569  for (int Ch1N=0; Ch1N<TCh::Vals; Ch1N++){
1570  for (int Ch2N=0; Ch2N<TCh::Vals; Ch2N++){
1571  DChStrVV.At(Ch1N, Ch2N)=
1572  TStr(char(TCh::Mn+Ch1N), char(TCh::Mn+Ch2N), true);
1573  }
1574  }
1575  }
1576  return DChStrVV.At(int(Ch1-TCh::Mn), int(Ch2-TCh::Mn));
1577 }
#define Fail
Definition: bd.h:238
Definition: ds.h:2223
static const char Mn
Definition: dt.h:1032
static const int Vals
Definition: dt.h:1034
TStr()
Definition: dt.h:423
void Gen(const TSizeTy &_XDim, const TSizeTy &_YDim)
Definition: ds.h:2247
bool Empty() const
Definition: ds.h:2245
const TVal & At(const TSizeTy &X, const TSizeTy &Y) const
Definition: ds.h:2256

Here is the call graph for this function:

TStr TStr::GetFBase ( ) const

Definition at line 1396 of file dt.cpp.

References CStr(), GetSubStr(), and Len().

Referenced by TEnv::PrepArgs(), PutFBaseIfEmpty(), and TFFile::TFFile().

1396  {
1397  int ThisLen=Len(); const char* ThisBf=CStr();
1398  int ChN=ThisLen-1;
1399  while ((ChN>=0)&&(ThisBf[ChN]!='/')&&(ThisBf[ChN]!='\\')){ChN--;}
1400  return GetSubStr(ChN+1, ThisLen);
1401 }
int Len() const
Definition: dt.h:490
TStr GetSubStr(const int &BChN, const int &EChN) const
Definition: dt.cpp:811
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

Here is the caller graph for this function:

TStr TStr::GetFExt ( ) const

Definition at line 1421 of file dt.cpp.

References CStr(), GetSubStr(), Len(), and TStr().

Referenced by AddToFMid(), TSnap::DrawGViz(), TZipIn::GetCmd(), TZipOut::GetCmd(), TGBlobBs::GetNrBlobBsFNm(), GetNrFNm(), GetNumFNm(), TAGMUtil::GVizComGraph(), TSnap::TSnapDetail::GVizDoLayout(), TZipIn::IsZipFNm(), TZipOut::IsZipFNm(), PutFExtIfEmpty(), TSsParser::TSsParser(), and TZipIn::TZipIn().

1421  {
1422  int ThisLen=Len(); const char* ThisBf=CStr();
1423  int ChN=ThisLen-1;
1424  while ((ChN>=0)&&(ThisBf[ChN]!='/')&&(ThisBf[ChN]!='\\')&&
1425  (ThisBf[ChN]!='.')){ChN--;}
1426  if ((ChN>=0)&&(ThisBf[ChN]=='.')){return GetSubStr(ChN, Len());}
1427  else {return TStr();}
1428 }
int Len() const
Definition: dt.h:490
TStr GetSubStr(const int &BChN, const int &EChN) const
Definition: dt.cpp:811
char * CStr()
Definition: dt.h:479
TStr()
Definition: dt.h:423

Here is the call graph for this function:

Here is the caller graph for this function:

double TStr::GetFlt ( ) const
inline

Definition at line 631 of file dt.h.

References IAssert, and IsFlt().

Referenced by TEnv::GetIfArgPrefixFlt(), TMAGNodeSimple::LoadTxt(), TMAGNodeBern::LoadTxt(), TMAGNodeBeta::LoadTxt(), and TFlt::TFlt().

631  {
632  double Val; IAssert(IsFlt(false, 0, 0, Val)); return Val;}
#define IAssert(Cond)
Definition: bd.h:262
bool IsFlt() const
Definition: dt.h:630

Here is the call graph for this function:

Here is the caller graph for this function:

double TStr::GetFlt ( const double &  DfVal) const
inline

Definition at line 633 of file dt.h.

References IsFlt().

633  {
634  double Val; if (IsFlt(false, 0, 0, Val)){return Val;} else {return DfVal;}}
bool IsFlt() const
Definition: dt.h:630

Here is the call graph for this function:

TStr TStr::GetFMid ( ) const

Definition at line 1403 of file dt.cpp.

References CStr(), GetSubStr(), and Len().

Referenced by AddToFMid(), TGraphKey::DrawGViz(), TZipOut::GetCmd(), GetNrFNm(), TMBlobBs::GetNrFPathFMid(), GetNumFNm(), PutFExt(), PutFExtIfEmpty(), TGnuPlot::SaveEps(), TGnuPlot::SavePng(), and TNcpGraphsBase::TNcpGraphsBase().

1403  {
1404  int ThisLen=Len(); const char* ThisBf=CStr();
1405  int ChN=ThisLen-1;
1406  while ((ChN>=0)&&(ThisBf[ChN]!='/')&&(ThisBf[ChN]!='\\')&&(ThisBf[ChN]!='.')){
1407  ChN--;}
1408  if (ChN<0){
1409  return *this;
1410  } else {
1411  if (ThisBf[ChN]=='.'){
1412  int EChN= --ChN;
1413  while ((ChN>=0)&&(ThisBf[ChN]!='/')&&(ThisBf[ChN]!='\\')){ChN--;}
1414  return GetSubStr(ChN+1, EChN);
1415  } else {
1416  return GetSubStr(ChN+1, ThisLen);
1417  }
1418  }
1419 }
int Len() const
Definition: dt.h:490
TStr GetSubStr(const int &BChN, const int &EChN) const
Definition: dt.cpp:811
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

Here is the caller graph for this function:

TStr TStr::GetFNmStr ( const TStr Str,
const bool &  AlNumOnlyP = true 
)
static

Definition at line 1531 of file dt.cpp.

References TChA::Len(), and TChA::PutCh().

1531  {
1532  TChA FNm=Str;
1533  for (int ChN=0; ChN<FNm.Len(); ChN++){
1534  uchar Ch=FNm[ChN];
1535  if (AlNumOnlyP){
1536  if (
1537  (('0'<=Ch)&&(Ch<='9'))||
1538  (('A'<=Ch)&&(Ch<='Z'))||
1539  (('a'<=Ch)&&(Ch<='z'))||
1540  (Ch=='-')||(Ch=='_')){}
1541  else {Ch='_';}
1542  } else {
1543  if ((Ch<=' ')||(Ch=='/')||(Ch=='\\')||(Ch==':')||(Ch=='.')){
1544  Ch='_';}
1545  }
1546  FNm.PutCh(ChN, Ch);
1547  }
1548  return FNm;
1549 }
void PutCh(const int &ChN, const char &Ch)
Definition: dt.h:278
int Len() const
Definition: dt.h:259
unsigned char uchar
Definition: bd.h:10
Definition: dt.h:201

Here is the call graph for this function:

TStr TStr::GetFPath ( ) const

Definition at line 1389 of file dt.cpp.

References CStr(), GetSubStr(), and Len().

Referenced by AddToFMid(), TUnicodeDef::GetDfFNm(), TEnv::GetExeFPath(), GetNrFNm(), TMBlobBs::GetNrFPathFMid(), GetNumFNm(), PutFBase(), PutFBaseIfEmpty(), PutFExt(), PutFExtIfEmpty(), TGnuPlot::SaveEps(), TGnuPlot::SavePng(), and TFFile::TFFile().

1389  {
1390  int ThisLen=Len(); const char* ThisBf=CStr();
1391  int ChN=ThisLen-1;
1392  while ((ChN>=0)&&(ThisBf[ChN]!='/')&&(ThisBf[ChN]!='\\')){ChN--;}
1393  return GetSubStr(0, ChN);
1394 }
int Len() const
Definition: dt.h:490
TStr GetSubStr(const int &BChN, const int &EChN) const
Definition: dt.cpp:811
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

Here is the caller graph for this function:

TStr TStr::GetFromHex ( ) const
inline

Definition at line 517 of file dt.h.

References TStr().

517 {return TStr(*this).FromHex();}
TStr()
Definition: dt.h:423

Here is the call graph for this function:

TStr TStr::GetHex ( ) const
inline

Definition at line 515 of file dt.h.

References TStr().

Referenced by TXmlLx::GetSymStr().

515 {return TStr(*this).ToHex();}
TStr()
Definition: dt.h:423

Here is the call graph for this function:

Here is the caller graph for this function:

int TStr::GetHexInt ( ) const
inline

Definition at line 614 of file dt.h.

References IAssert, and IsHexInt().

614  {
615  int Val; IAssert(IsHexInt(false, 0, 0, Val)); return Val;}
#define IAssert(Cond)
Definition: bd.h:262
bool IsHexInt() const
Definition: dt.h:613

Here is the call graph for this function:

int TStr::GetHexInt ( const int &  DfVal) const
inline

Definition at line 616 of file dt.h.

References IsHexInt().

616  {
617  int Val; if (IsHexInt(false, 0, 0, Val)){return Val;} else {return DfVal;}}
bool IsHexInt() const
Definition: dt.h:613

Here is the call graph for this function:

int64 TStr::GetHexInt64 ( ) const
inline

Definition at line 622 of file dt.h.

References IAssert, and IsHexInt64().

622  {
623  int64 Val; IAssert(IsHexInt64(false, 0, 0, Val)); return Val;}
#define IAssert(Cond)
Definition: bd.h:262
bool IsHexInt64() const
Definition: dt.h:621
long long int64
Definition: bd.h:27

Here is the call graph for this function:

int64 TStr::GetHexInt64 ( const int64 DfVal) const
inline

Definition at line 624 of file dt.h.

References IsHexInt64().

624  {
625  int64 Val; if (IsHexInt64(false, 0, 0, Val)){return Val;} else {return DfVal;}}
bool IsHexInt64() const
Definition: dt.h:621
long long int64
Definition: bd.h:27

Here is the call graph for this function:

int TStr::GetInt ( ) const
inline

Definition at line 581 of file dt.h.

References IAssertR, and IsInt().

Referenced by TSecTm::GetDtTmFromDmyStr(), TSecTm::GetDtTmFromHmsStr(), TSecTm::GetDtTmFromMdyHmsPmStr(), TSecTm::GetDtTmFromMdyStr(), TSecTm::GetDtTmFromYmdHmsStr(), TUrlLx::GetHostPort(), TEnv::GetIfArgPrefixInt(), TTm::GetTmFromWebLogDateTimeStr(), TTm::GetTmFromWebLogTimeStr(), TTimeNet::LoadAmazon(), TCesnaUtil::LoadNIDAttrHFromNIDKH(), TTimeNet::LoadPatents(), and THttpRq::ParseHttpRq().

581 {int Val; IAssertR(IsInt(false, 0, 0, Val), *this); return Val;}
#define IAssertR(Cond, Reason)
Definition: bd.h:265
bool IsInt() const
Definition: dt.h:580

Here is the call graph for this function:

Here is the caller graph for this function:

int TStr::GetInt ( const int &  DfVal) const
inline

Definition at line 582 of file dt.h.

References IsInt().

582  {
583  int Val; if (IsInt(false, 0, 0, Val)){return Val;} else {return DfVal;}}
bool IsInt() const
Definition: dt.h:580

Here is the call graph for this function:

int64 TStr::GetInt64 ( ) const
inline

Definition at line 597 of file dt.h.

References IAssert, and IsInt64().

597  {
598  int64 Val; IAssert(IsInt64(false, 0, 0, Val)); return Val;}
#define IAssert(Cond)
Definition: bd.h:262
bool IsInt64() const
Definition: dt.h:596
long long int64
Definition: bd.h:27

Here is the call graph for this function:

int64 TStr::GetInt64 ( const int64 DfVal) const
inline

Definition at line 599 of file dt.h.

References IsInt64().

599  {
600  int64 Val; if (IsInt64(false, 0, 0, Val)){return Val;} else {return DfVal;}}
bool IsInt64() const
Definition: dt.h:596
long long int64
Definition: bd.h:27

Here is the call graph for this function:

TStr TStr::GetLc ( ) const
inline

Definition at line 502 of file dt.h.

References TStr().

Referenced by TUrl::DefFinalUrl(), TUrl::GetAbsFromBase(), TZipIn::GetCmd(), TZipOut::GetCmd(), TTmInfo::GetDayOfWeekN(), TTmInfo::GetMonthN(), TSs::GetSsFmtFromStr(), TXmlLx::GetSym(), TUrl::GetTopDownDocNm(), TUnicode::GetUtf8CaseFolded(), TUrl::IsAbs(), TUnicode::NormalizeCodecName(), ParseMotifType(), and MotifCluster::ParseMotifType().

502 {return TStr(*this).ToLc();}
TStr()
Definition: dt.h:423

Here is the call graph for this function:

Here is the caller graph for this function:

int TStr::GetMemUsed ( ) const
inline

Definition at line 475 of file dt.h.

References TRStr::GetMemUsed().

475 {return int(sizeof(TRStr*)+RStr->GetMemUsed());}
TRStr * RStr
Definition: dt.h:414
int GetMemUsed() const
Definition: dt.h:376
Definition: dt.h:346

Here is the call graph for this function:

TStr TStr::GetNrAbsFPath ( const TStr FPath,
const TStr BaseFPath = TStr() 
)
static

Definition at line 1471 of file dt.cpp.

References ChangeStrAll(), Empty(), TDir::GetCurDir(), GetNrFPath(), IAssert, and IsAbsFPath().

1471  {
1472  TStr NrBaseFPath;
1473  if (BaseFPath.Empty()){
1474  NrBaseFPath=GetNrFPath(TDir::GetCurDir());
1475  } else {
1476  NrBaseFPath=GetNrFPath(BaseFPath);
1477  }
1478  IAssert(IsAbsFPath(NrBaseFPath));
1479  TStr NrFPath=GetNrFPath(FPath);
1480  TStr NrAbsFPath;
1481  if (IsAbsFPath(NrFPath)){
1482  NrAbsFPath=NrFPath;
1483  } else {
1484  NrAbsFPath=GetNrFPath(NrBaseFPath+NrFPath);
1485  }
1486  NrAbsFPath.ChangeStrAll("/./", "/");
1487  NrAbsFPath.ChangeStrAll("\\.\\", "\\");
1488  return NrAbsFPath;
1489 }
#define IAssert(Cond)
Definition: bd.h:262
static TStr GetCurDir()
Definition: xfl.cpp:233
int ChangeStrAll(const TStr &SrcStr, const TStr &DstStr, const bool &FromStartP=false)
Definition: dt.cpp:1141
static TStr GetNrFPath(const TStr &FPath)
Definition: dt.cpp:1430
Definition: dt.h:412
bool Empty() const
Definition: dt.h:491
static bool IsAbsFPath(const TStr &FPath)
Definition: dt.cpp:1491

Here is the call graph for this function:

TStr TStr::GetNrFExt ( const TStr FExt)
static

Definition at line 1455 of file dt.cpp.

References Empty(), and TStr().

Referenced by GetNrFNm(), and TFFile::TFFile().

1455  {
1456  if (FExt.Empty()||(FExt[0]=='.')){return FExt;}
1457  else {return TStr(".")+FExt;}
1458 }
bool Empty() const
Definition: dt.h:491
TStr()
Definition: dt.h:423

Here is the call graph for this function:

Here is the caller graph for this function:

TStr TStr::GetNrFMid ( const TStr FMid)
static

Definition at line 1445 of file dt.cpp.

References TCh::IsAlNum(), and Len().

Referenced by TMBlobBs::GetNrFPathFMid().

1445  {
1446  TChA NrFMid;
1447  int FMidLen=FMid.Len();
1448  for (int ChN=0; ChN<FMidLen; ChN++){
1449  char Ch=FMid[ChN];
1450  if (TCh::IsAlNum(Ch)){NrFMid+=Ch;} else {NrFMid+='_';}
1451  }
1452  return NrFMid;
1453 }
int Len() const
Definition: dt.h:490
Definition: dt.h:201
static bool IsAlNum(const char &Ch)
Definition: dt.h:1068

Here is the call graph for this function:

Here is the caller graph for this function:

TStr TStr::GetNrFNm ( const TStr FNm)
static

Definition at line 1467 of file dt.cpp.

References GetFExt(), GetFMid(), GetFPath(), GetNrFExt(), and GetNrFPath().

1467  {
1468  return GetNrFPath(FNm.GetFPath())+FNm.GetFMid()+GetNrFExt(FNm.GetFExt());
1469 }
TStr GetFMid() const
Definition: dt.cpp:1403
TStr GetFPath() const
Definition: dt.cpp:1389
TStr GetFExt() const
Definition: dt.cpp:1421
static TStr GetNrFPath(const TStr &FPath)
Definition: dt.cpp:1430
static TStr GetNrFExt(const TStr &FExt)
Definition: dt.cpp:1455

Here is the call graph for this function:

TStr TStr::GetNrFPath ( const TStr FPath)
static

Definition at line 1430 of file dt.cpp.

References ChangeCh(), and Len().

Referenced by TDir::GetCurDir(), TDir::GetExeDir(), GetNrAbsFPath(), GetNrFNm(), TMBlobBs::GetNrFPathFMid(), and TFFile::TFFile().

1430  {
1431  TChA NrFPath(FPath.Len()+4); NrFPath+=FPath;
1432  NrFPath.ChangeCh('\\', '/');
1433  if (NrFPath.Empty()){NrFPath="./";}
1434  if ((NrFPath.Len()>=2)&&isalpha(NrFPath[0])&&(NrFPath[1]==':')){
1435  if (NrFPath.Len()==2){NrFPath+="./";}
1436  if ((NrFPath[2]!='.')&&(NrFPath[2]!='/')){NrFPath.Ins(2, "./");}
1437  if (NrFPath[NrFPath.Len()-1]!='/'){NrFPath+="/";}
1438  } else {
1439  if ((NrFPath[0]!='.')&&(NrFPath[0]!='/')){NrFPath.Ins(0, "./");}
1440  if (NrFPath[NrFPath.Len()-1]!='/'){NrFPath+="/";}
1441  }
1442  return NrFPath;
1443 }
int Len() const
Definition: dt.h:490
Definition: dt.h:201
int ChangeCh(const char &SrcCh, const char &DstCh, const int &BChN=0)
Definition: dt.cpp:1107

Here is the call graph for this function:

Here is the caller graph for this function:

TStr TStr::GetNrNumFExt ( const int &  FExtN)
static

Definition at line 1460 of file dt.cpp.

References TInt::GetStr(), Len(), and TStr().

Referenced by TMBlobBs::GetSegFNm().

1460  {
1461  TStr FExtNStr=TInt::GetStr(FExtN);
1462  while (FExtNStr.Len()<3){
1463  FExtNStr=TStr("0")+FExtNStr;}
1464  return FExtNStr;
1465 }
TStr GetStr() const
Definition: dt.h:1200
int Len() const
Definition: dt.h:490
Definition: dt.h:412
TStr()
Definition: dt.h:423

Here is the call graph for this function:

Here is the caller graph for this function:

TStr TStr::GetNumFNm ( const TStr FNm,
const int &  Num 
)
static

Definition at line 1527 of file dt.cpp.

References GetFExt(), GetFMid(), GetFPath(), and TInt::GetStr().

1527  {
1528  return FNm.GetFPath()+FNm.GetFMid()+TInt::GetStr(Num, "%03d")+FNm.GetFExt();
1529 }
TStr GetStr() const
Definition: dt.h:1200
TStr GetFMid() const
Definition: dt.cpp:1403
TStr GetFPath() const
Definition: dt.cpp:1389
TStr GetFExt() const
Definition: dt.cpp:1421

Here is the call graph for this function:

int TStr::GetPrimHashCd ( ) const
inline

Definition at line 572 of file dt.h.

References TRStr::GetPrimHashCd().

Referenced by TDbStr::GetPrimHashCd().

572 {return RStr->GetPrimHashCd();}
TRStr * RStr
Definition: dt.h:414
int GetPrimHashCd() const
Definition: dt.cpp:709

Here is the call graph for this function:

Here is the caller graph for this function:

TRStr * TStr::GetRStr ( const char *  CStr)
staticprivate

Definition at line 719 of file dt.cpp.

References TRStr::GetNullRStr().

Referenced by operator=(), and TStr().

719  {
720  int CStrLen;
721  if (CStr==NULL){CStrLen=0;} else {CStrLen=int(strlen(CStr));}
722  if (CStrLen==0){return TRStr::GetNullRStr();}
723  // next lines are not multi-threading safe
724  //else if (CStrLen==1){return GetChStr(CStr[0]).RStr;}
725  //else if (CStrLen==2){return GetDChStr(CStr[0], CStr[1]).RStr;}
726  else {return new TRStr(CStr);}
727 }
static TRStr * GetNullRStr()
Definition: dt.h:402
char * CStr()
Definition: dt.h:479
Definition: dt.h:346

Here is the call graph for this function:

Here is the caller graph for this function:

int TStr::GetSecHashCd ( ) const
inline

Definition at line 573 of file dt.h.

References TRStr::GetSecHashCd().

Referenced by TDbStr::GetSecHashCd().

573 {return RStr->GetSecHashCd();}
TRStr * RStr
Definition: dt.h:414
int GetSecHashCd() const
Definition: dt.cpp:713

Here is the call graph for this function:

Here is the caller graph for this function:

TStr TStr::GetSpaceStr ( const int &  Spaces)
static

Definition at line 1608 of file dt.cpp.

References TVec< TVal, TSizeTy >::Add(), and TVec< TVal, TSizeTy >::Len().

Referenced by THtmlLx::GetPreSpaceStr(), and TTmProfiler::PrintReport().

1608  {
1609  static TStrV SpaceStrV;
1610  if (SpaceStrV.Len()==0){
1611  for (int SpaceStrN=0; SpaceStrN<10; SpaceStrN++){
1612  TChA SpaceChA;
1613  for (int ChN=0; ChN<SpaceStrN; ChN++){SpaceChA+=' ';}
1614  SpaceStrV.Add(SpaceChA);
1615  }
1616  }
1617  if ((0<=Spaces)&&(Spaces<SpaceStrV.Len())){
1618  return SpaceStrV[Spaces];
1619  } else {
1620  TChA SpaceChA;
1621  for (int ChN=0; ChN<Spaces; ChN++){SpaceChA+=' ';}
1622  return SpaceChA;
1623  }
1624 }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:575
Definition: dt.h:201
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:602

Here is the call graph for this function:

Here is the caller graph for this function:

TStr TStr::GetStr ( const TStr Str,
const char *  FmtStr 
)
static

Definition at line 1579 of file dt.cpp.

References CStr(), and TStr().

1579  {
1580  if (FmtStr==NULL){
1581  return Str;
1582  } else {
1583  char Bf[1000];
1584  sprintf(Bf, FmtStr, Str.CStr());
1585  return TStr(Bf);
1586  }
1587 }
char * CStr()
Definition: dt.h:479
TStr()
Definition: dt.h:423

Here is the call graph for this function:

static TStr TStr::GetStr ( const TStr Str,
const TStr FmtStr 
)
inlinestatic

Definition at line 683 of file dt.h.

References CStr(), and GetStr().

683  {
684  return GetStr(Str, FmtStr.CStr());}
TStr GetStr() const
Definition: dt.h:681
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

TStr TStr::GetStr ( const TStrV StrV,
const TStr DelimiterStr 
)
static

Definition at line 1589 of file dt.cpp.

References TVec< TVal, TSizeTy >::Empty(), TVec< TVal, TSizeTy >::Len(), and TStr().

1589  {
1590  if (StrV.Empty()){return TStr();}
1591  TChA ResStr=StrV[0];
1592  for (int StrN=1; StrN<StrV.Len(); StrN++){
1593  ResStr+=DelimiterStr;
1594  ResStr+=StrV[StrN];
1595  }
1596  return ResStr;
1597 }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:575
bool Empty() const
Tests whether the vector is empty.
Definition: ds.h:570
Definition: dt.h:201
TStr()
Definition: dt.h:423

Here is the call graph for this function:

TStr TStr::GetSubStr ( const int &  BChN,
const int &  EChN 
) const

Definition at line 811 of file dt.cpp.

References CStr(), TInt::GetMn(), TInt::GetMx(), Len(), and TStr().

Referenced by TTable::DenormalizeColName(), TSnap::DrawGViz(), TUrl::GetAbsFromBase(), TEnv::GetArgPostfix(), TEnv::GetExeFNm(), GetFBase(), GetFExt(), GetFMid(), GetFPath(), THtmlTok::GetFullStr(), TEnv::GetIfArgPrefixStr(), TEnv::GetIfArgPrefixStrV(), TTypeNm< Type >::GetNrTypeNm(), TTable::GetSchema(), THtmlDoc::GetTxtLnDoc(), TAGMUtil::GVizComGraph(), InsStr(), THtmlTok::IsUrlTok(), Left(), LeftOf(), LeftOfLast(), TTimeNet::LoadAmazon(), TUniChDb::LoadTxt_ProcessDecomposition(), Mid(), TUniChDb::TUcdFileReader::ParseCodePointRange(), TModeNet::RemoveCrossNets(), TTable::RenumberColName(), Right(), RightOf(), RightOfLast(), THtmlDoc::SaveHtmlToXml(), TMAGParam< TNodeAttr >::SaveTxt(), Slice(), SplitOnCh(), SplitOnLastCh(), SplitOnStr(), TNcpGraphsBase::TNcpGraphsBase(), and ToTrunc().

811  {
812  int StrLen=Len();
813  int BChN=TInt::GetMx(_BChN, 0);
814  int EChN=TInt::GetMn(_EChN, StrLen-1);
815  int Chs=EChN-BChN+1;
816  if (Chs<=0){return TStr();}
817  else if (Chs==StrLen){return *this;}
818  else {
819  char* Bf=new char[Chs+1]; strncpy(Bf, CStr()+BChN, Chs); Bf[Chs]=0;
820  TStr Str(Bf); delete[] Bf;
821  return Str;
822  }
823 }
int Len() const
Definition: dt.h:490
static int GetMx(const int &Int1, const int &Int2)
Definition: dt.h:1185
static int GetMn(const int &Int1, const int &Int2)
Definition: dt.h:1183
Definition: dt.h:412
char * CStr()
Definition: dt.h:479
TStr()
Definition: dt.h:423

Here is the call graph for this function:

Here is the caller graph for this function:

TStr TStr::GetSubStr ( const int &  BChN) const
inline

Definition at line 520 of file dt.h.

References GetSubStr(), and Len().

Referenced by GetSubStr().

520 { return GetSubStr(BChN, Len()-1); }
int Len() const
Definition: dt.h:490
TStr GetSubStr(const int &BChN, const int &EChN) const
Definition: dt.cpp:811

Here is the call graph for this function:

Here is the caller graph for this function:

TStr TStr::GetTrunc ( ) const
inline

Definition at line 509 of file dt.h.

References TStr().

Referenced by THttpResp::GetCookieKeyValDmPathQuV(), and TSs::GetFldY().

509 {return TStr(*this).ToTrunc();}
TStr()
Definition: dt.h:423

Here is the call graph for this function:

Here is the caller graph for this function:

TStr TStr::GetUc ( ) const
inline

Definition at line 496 of file dt.h.

References TStr().

Referenced by TFRnd::GetFAccessFromStr(), TBool::GetValFromStr(), TGStatVec::ImposeDistr(), THttp::IsGifFExt(), THttp::IsHtmlFExt(), TUrl::IsInHost(), TUrl::IsInPath(), THtmlTok::IsRedirUrlTok(), THtmlTok::IsUrlTok(), TBool::IsValStr(), TGStat::Plot(), and TFOut::TFOut().

496 {return TStr(*this).ToUc();}
TStr()
Definition: dt.h:423

Here is the call graph for this function:

Here is the caller graph for this function:

uint TStr::GetUInt ( ) const
inline

Definition at line 589 of file dt.h.

References IAssert, and IsUInt().

589 {uint Val; IAssert(IsUInt(false, 0, 0, Val)); return Val;}
#define IAssert(Cond)
Definition: bd.h:262
bool IsUInt() const
Definition: dt.h:588
unsigned int uint
Definition: bd.h:11

Here is the call graph for this function:

uint TStr::GetUInt ( const uint DfVal) const
inline

Definition at line 590 of file dt.h.

References IsUInt().

590  {
591  uint Val; if (IsUInt(false, 0, 0, Val)){return Val;} else {return DfVal;}}
bool IsUInt() const
Definition: dt.h:588
unsigned int uint
Definition: bd.h:11

Here is the call graph for this function:

uint64 TStr::GetUInt64 ( ) const
inline

Definition at line 606 of file dt.h.

References IAssert, and IsUInt64().

606  {
607  uint64 Val; IAssert(IsUInt64(false, 0, 0, Val)); return Val;}
#define IAssert(Cond)
Definition: bd.h:262
unsigned long long uint64
Definition: bd.h:38
bool IsUInt64() const
Definition: dt.h:605

Here is the call graph for this function:

uint64 TStr::GetUInt64 ( const uint64 DfVal) const
inline

Definition at line 608 of file dt.h.

References IsUInt64().

608  {
609  uint64 Val; if (IsUInt64(false, 0, 0, Val)){return Val;} else {return DfVal;}}
unsigned long long uint64
Definition: bd.h:38
bool IsUInt64() const
Definition: dt.h:605

Here is the call graph for this function:

TStr TStr::GetUsFromYuAscii ( ) const
inline

Definition at line 512 of file dt.h.

References TStr().

512 {return TStr(*this).ConvUsFromYuAscii();}
TStr()
Definition: dt.h:423

Here is the call graph for this function:

TStr TStr::GetWcMatch ( const TStr WcStr,
const int &  StarStrN = 0 
) const

Definition at line 1379 of file dt.cpp.

References IAssert, IsWcMatch(), and TVec< TVal, TSizeTy >::Len().

1379  {
1380  TStrV StarStrV;
1381  if (IsWcMatch(WcStr, StarStrV)&&(StarStrV.Len()>=StarStrN)){
1382  IAssert(StarStrN>=0);
1383  return StarStrV[StarStrV.Len()-StarStrN-1];
1384  } else {
1385  return "";
1386  }
1387 }
#define IAssert(Cond)
Definition: bd.h:262
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:575
bool IsWcMatch(const int &StrBChN, const TStr &WcStr, const int &WcStrBChN, TStrV &StarStrV, const char &StarCh='*', const char &QuestCh='?') const
Definition: dt.cpp:1311

Here is the call graph for this function:

void TStr::InsStr ( const int &  BChN,
const TStr Str 
)

Definition at line 825 of file dt.cpp.

References GetSubStr(), IAssert, and Len().

Referenced by ChangeStr(), TSnap::CmtyEvolutionJson(), and TFile::GetUniqueFNm().

825  {
826  int ThisLen=Len();
827  IAssert((0<=BChN)&&(BChN<=ThisLen));
828  TStr NewStr;
829  if (BChN==0){
830  NewStr=Str+*this;
831  } else
832  if (BChN==ThisLen){
833  NewStr=*this+Str;
834  } else {
835  NewStr=GetSubStr(0, BChN-1)+Str+GetSubStr(BChN, ThisLen-1);
836  }
837  *this=NewStr;
838 }
#define IAssert(Cond)
Definition: bd.h:262
int Len() const
Definition: dt.h:490
TStr GetSubStr(const int &BChN, const int &EChN) const
Definition: dt.cpp:811
Definition: dt.h:412

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsAbsFPath ( const TStr FPath)
static

Definition at line 1491 of file dt.cpp.

References Len().

Referenced by GetNrAbsFPath().

1491  {
1492  if ((FPath.Len()>=3)&&isalpha(FPath[0])&&(FPath[1]==':')&&
1493  ((FPath[2]=='/')||(FPath[2]=='\\'))){
1494  return true;
1495  }
1496  return false;
1497 }
int Len() const
Definition: dt.h:490

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsBool ( bool &  Val) const

Definition at line 1153 of file dt.cpp.

Referenced by TXmlObjSer::GetBoolArg().

1153  {
1154  if (operator==("T")){Val=true; return true;}
1155  else if (operator==("F")){Val=false; return true;}
1156  else {return false;}
1157 }

Here is the caller graph for this function:

bool TStr::IsChIn ( const char &  Ch) const
inline

Definition at line 556 of file dt.h.

References SearchCh().

Referenced by TXmlLx::GetArgValQCh(), THttpResp::GetCookieKeyValDmPathQuV(), TUrl::GetUrlFromShortcut(), and TUrl::IsScript().

556 {return SearchCh(Ch)!=-1;}
int SearchCh(const char &Ch, const int &BChN=0) const
Definition: dt.cpp:1043

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsFlt ( const bool &  Check,
const double &  MnVal,
const double &  MxVal,
double &  Val,
const char &  DecDelimCh = '.' 
) const

Definition at line 1265 of file dt.cpp.

References CStr(), TChRet::Eof(), TChRet::GetCh(), TCh::IsNum(), TCh::IsWs(), and TStrIn::New().

Referenced by TXmlObjSer::GetFltArg().

1266  {
1267  // parsing format {ws} [+/-] +{d} ([.]{d}) ([E|e] [+/-] +{d})
1268  TChRet Ch(TStrIn::New(*this));
1269  while (TCh::IsWs(Ch.GetCh())){}
1270  if ((Ch()=='+')||(Ch()=='-')){Ch.GetCh();}
1271  if (!TCh::IsNum(Ch())&&Ch()!=DecDelimCh){return false;}
1272  while (TCh::IsNum(Ch.GetCh())){}
1273  if (Ch()==DecDelimCh){
1274  Ch.GetCh();
1275  while (TCh::IsNum(Ch.GetCh())){}
1276  }
1277  if ((Ch()=='e')||(Ch()=='E')){
1278  Ch.GetCh();
1279  if ((Ch()=='+')||(Ch()=='-')){Ch.GetCh();}
1280  if (!TCh::IsNum(Ch())){return false;}
1281  while (TCh::IsNum(Ch.GetCh())){}
1282  }
1283  if (!Ch.Eof()){return false;}
1284  double _Val=atof(CStr());
1285  if (Check&&((_Val<MnVal)||(_Val>MxVal))){
1286  return false;
1287  } else {
1288  Val=_Val; return true;
1289  }
1290 }
static bool IsNum(const char &Ch)
Definition: dt.h:1067
static bool IsWs(const char &Ch)
Definition: dt.h:1063
static PSIn New(const TStr &Str)
Definition: dt.h:711
char * CStr()
Definition: dt.h:479
Definition: fl.h:535

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsFlt ( double &  Val) const
inline

Definition at line 629 of file dt.h.

References IsFlt().

Referenced by IsFlt().

629 {return IsFlt(false, 0, 0, Val);}
bool IsFlt() const
Definition: dt.h:630

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsFlt ( ) const
inline

Definition at line 630 of file dt.h.

References IsFlt().

Referenced by GetFlt(), and IsFlt().

630 {double Val; return IsFlt(false, 0, 0, Val);}
bool IsFlt() const
Definition: dt.h:630

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsHexInt ( const bool &  Check,
const int &  MnVal,
const int &  MxVal,
int &  Val 
) const

Definition at line 1190 of file dt.cpp.

References TChRet::Eof(), TChRet::GetCh(), TCh::GetHex(), TCh::IsHex(), TCh::IsWs(), and TStrIn::New().

Referenced by TUniChDb::TUcdFileReader::ParseCodePoint().

1190  {
1191  // parsing format {ws} [+/-][0x] +{XXX}
1192  int _Val=0;
1193  bool Minus=false;
1194  TChRet Ch(TStrIn::New(*this));
1195  while (TCh::IsWs(Ch.GetCh())){}
1196  if (Ch()=='+'){Minus=false; Ch.GetCh();}
1197  if (Ch()=='-'){Minus=true; Ch.GetCh();}
1198  if (Ch()=='0'){
1199  Ch.GetCh();
1200  if (tolower(Ch())=='x' ){
1201  Ch.GetCh(); if (Ch.Eof()){return false;}
1202  }
1203  }
1204  if (!Ch.Eof() && !TCh::IsHex(Ch())){return false;}
1205  if (!Ch.Eof()) _Val = TCh::GetHex(Ch());
1206  while (TCh::IsHex(Ch.GetCh())){_Val=16*_Val+TCh::GetHex(Ch());}
1207  if (Minus){_Val=-_Val;}
1208  if (Check&&((_Val<MnVal)||(_Val>MxVal))){return false;}
1209  if (Ch.Eof()){Val=_Val; return true;} else {return false;}
1210 }
static bool IsHex(const char &Ch)
Definition: dt.h:1070
static int GetHex(const char &Ch)
Definition: dt.h:1072
static bool IsWs(const char &Ch)
Definition: dt.h:1063
static PSIn New(const TStr &Str)
Definition: dt.h:711
Definition: fl.h:535

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsHexInt ( int &  Val) const
inline

Definition at line 612 of file dt.h.

References IsHexInt().

Referenced by IsHexInt().

612 {return IsHexInt(false, 0, 0, Val);}
bool IsHexInt() const
Definition: dt.h:613

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsHexInt ( ) const
inline

Definition at line 613 of file dt.h.

References IsHexInt().

Referenced by GetHexInt(), and IsHexInt().

613 {int Val; return IsHexInt(false, 0, 0, Val);}
bool IsHexInt() const
Definition: dt.h:613

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsHexInt64 ( const bool &  Check,
const int64 MnVal,
const int64 MxVal,
int64 Val 
) const

Definition at line 1243 of file dt.cpp.

References TChRet::Eof(), TChRet::GetCh(), TCh::GetHex(), TCh::IsHex(), TCh::IsWs(), and TStrIn::New().

1244  {
1245  // parsing format {ws} [+/-][0x] +{XXX}
1246  int64 _Val=0;
1247  bool Minus=false;
1248  TChRet Ch(TStrIn::New(*this));
1249  while (TCh::IsWs(Ch.GetCh())){}
1250  if (Ch()=='+'){Minus=false; Ch.GetCh();}
1251  if (Ch()=='-'){Minus=true; Ch.GetCh();}
1252  if (Ch()=='0'){
1253  Ch.GetCh();
1254  if (tolower(Ch())=='x' ){
1255  Ch.GetCh(); if (Ch.Eof()){return false;}
1256  }
1257  }
1258  if (!Ch.Eof()) _Val=TCh::GetHex(Ch());
1259  while (TCh::IsHex(Ch.GetCh())){_Val=16*_Val+TCh::GetHex(Ch());}
1260  if (Minus){_Val=-_Val;}
1261  if (Check&&((_Val<MnVal)||(_Val>MxVal))){return false;}
1262  if (Ch.Eof()){Val=_Val; return true;} else {return false;}
1263 }
static bool IsHex(const char &Ch)
Definition: dt.h:1070
static int GetHex(const char &Ch)
Definition: dt.h:1072
static bool IsWs(const char &Ch)
Definition: dt.h:1063
static PSIn New(const TStr &Str)
Definition: dt.h:711
long long int64
Definition: bd.h:27
Definition: fl.h:535

Here is the call graph for this function:

bool TStr::IsHexInt64 ( int64 Val) const
inline

Definition at line 620 of file dt.h.

References IsHexInt64().

Referenced by IsHexInt64().

620 {return IsHexInt64(false, 0, 0, Val);}
bool IsHexInt64() const
Definition: dt.h:621

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsHexInt64 ( ) const
inline

Definition at line 621 of file dt.h.

References IsHexInt64().

Referenced by GetHexInt64(), and IsHexInt64().

621 {int64 Val; return IsHexInt64(false, 0, 0, Val);}
bool IsHexInt64() const
Definition: dt.h:621
long long int64
Definition: bd.h:27

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsInt ( const bool &  Check,
const int &  MnVal,
const int &  MxVal,
int &  Val 
) const

Definition at line 1159 of file dt.cpp.

References TChRet::Eof(), TChRet::GetCh(), TCh::GetNum(), TCh::IsNum(), TCh::IsWs(), and TStrIn::New().

Referenced by TSecTm::GetDtTmFromMdyHmsPmStr(), TSecTm::GetDtTmFromYmdHmsStr(), TXmlObjSer::GetIntArg(), and TUniChDb::LoadTxt().

1160  {
1161  // parsing format {ws} [+/-] +{ddd}
1162  int _Val=0;
1163  bool Minus=false;
1164  TChRet Ch(TStrIn::New(*this));
1165  while (TCh::IsWs(Ch.GetCh())){}
1166  if (Ch()=='+'){Minus=false; Ch.GetCh();}
1167  if (Ch()=='-'){Minus=true; Ch.GetCh();}
1168  if (!TCh::IsNum(Ch())){return false;}
1169  _Val=TCh::GetNum(Ch());
1170  while (TCh::IsNum(Ch.GetCh())){_Val=10*_Val+TCh::GetNum(Ch());}
1171  if (Minus){_Val=-_Val;}
1172  if (Check&&((_Val<MnVal)||(_Val>MxVal))){return false;}
1173  if (Ch.Eof()){Val=_Val; return true;} else {return false;}
1174 }
static bool IsNum(const char &Ch)
Definition: dt.h:1067
static bool IsWs(const char &Ch)
Definition: dt.h:1063
static PSIn New(const TStr &Str)
Definition: dt.h:711
static int GetNum(const char &Ch)
Definition: dt.h:1069
Definition: fl.h:535

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsInt ( int &  Val) const
inline

Definition at line 579 of file dt.h.

References IsInt().

Referenced by IsInt().

579 {return IsInt(false, 0, 0, Val);}
bool IsInt() const
Definition: dt.h:580

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsInt ( ) const
inline

Definition at line 580 of file dt.h.

References IsInt().

Referenced by GetInt(), and IsInt().

580 {int Val; return IsInt(false, 0, 0, Val);}
bool IsInt() const
Definition: dt.h:580

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsInt64 ( const bool &  Check,
const int64 MnVal,
const int64 MxVal,
int64 Val 
) const

Definition at line 1212 of file dt.cpp.

References TChRet::Eof(), TChRet::GetCh(), TCh::GetNum(), TCh::IsNum(), TCh::IsWs(), and TStrIn::New().

Referenced by TXmlObjSer::GetInt64Arg().

1213  {
1214  // parsing format {ws} [+/-] +{ddd}
1215  int64 _Val=0;
1216  bool Minus=false;
1217  TChRet Ch(TStrIn::New(*this));
1218  while (TCh::IsWs(Ch.GetCh())){}
1219  if (Ch()=='+'){Minus=false; Ch.GetCh();}
1220  if (Ch()=='-'){Minus=true; Ch.GetCh();}
1221  if (!TCh::IsNum(Ch())){return false;}
1222  _Val=TCh::GetNum(Ch());
1223  while (TCh::IsNum(Ch.GetCh())){_Val=10*_Val+TCh::GetNum(Ch());}
1224  if (Minus){_Val=-_Val;}
1225  if (Check&&((_Val<MnVal)||(_Val>MxVal))){return false;}
1226  if (Ch.Eof()){Val=_Val; return true;} else {return false;}
1227 }
static bool IsNum(const char &Ch)
Definition: dt.h:1067
static bool IsWs(const char &Ch)
Definition: dt.h:1063
static PSIn New(const TStr &Str)
Definition: dt.h:711
static int GetNum(const char &Ch)
Definition: dt.h:1069
long long int64
Definition: bd.h:27
Definition: fl.h:535

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsInt64 ( int64 Val) const
inline

Definition at line 595 of file dt.h.

References IsInt64().

Referenced by IsInt64().

595 {return IsInt64(false, 0, 0, Val);}
bool IsInt64() const
Definition: dt.h:596

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsInt64 ( ) const
inline

Definition at line 596 of file dt.h.

References IsInt64().

Referenced by GetInt64(), and IsInt64().

596 {int64 Val; return IsInt64(false, 0, 0, Val);}
bool IsInt64() const
Definition: dt.h:596
long long int64
Definition: bd.h:27

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsLc ( ) const
inline

Definition at line 500 of file dt.h.

References TRStr::IsLc().

Referenced by TUrl::ToLcPath().

500 {return RStr->IsLc();}
bool IsLc() const
Definition: dt.cpp:672
TRStr * RStr
Definition: dt.h:414

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsPrefix ( const char *  Str) const

Definition at line 1081 of file dt.cpp.

References TRStr::Bf, Len(), MIN, and RStr.

Referenced by TUrl::GetAbsFromBase(), TEnv::GetExeFNm(), TTypeNm< Type >::GetNrTypeNm(), TUrl::IsAbs(), and IsPrefix().

1081  {
1082  size_t len = strlen(Str);
1083  size_t thisLen = Len();
1084  if (len > thisLen) {
1085  return false;
1086  } else {
1087  size_t minLen = MIN(len, thisLen);
1088  int cmp = strncmp(Str, RStr->Bf, minLen);
1089  return cmp == 0;
1090  }
1091 }
TRStr * RStr
Definition: dt.h:414
int Len() const
Definition: dt.h:490
char * Bf
Definition: dt.h:348
#define MIN(a, b)
Definition: bd.h:346

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsPrefix ( const TStr Str) const
inline

Definition at line 559 of file dt.h.

References CStr(), and IsPrefix().

559  {
560  return IsPrefix(Str.CStr());}
bool IsPrefix(const char *Str) const
Definition: dt.cpp:1081
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

bool TStr::IsStrIn ( const TStr Str) const
inline

Definition at line 557 of file dt.h.

References SearchStr().

Referenced by TPredicate::EvalStrAtom(), TSnap::Intersect(), and TTable::SelfSimJoinPerGroup().

557 {return SearchStr(Str)!=-1;}
int SearchStr(const TStr &Str, const int &BChN=0) const
Definition: dt.cpp:1065

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsSuffix ( const char *  Str) const

Definition at line 1093 of file dt.cpp.

References TRStr::Bf, Len(), and RStr.

Referenced by THttpResp::AddFldVal(), IsSuffix(), and TModeNet::RemoveCrossNets().

1093  {
1094  size_t len = strlen(Str);
1095  size_t thisLen = Len();
1096  if (len > thisLen) {
1097  // too long to be a suffix anyway
1098  return false;
1099  } else {
1100  // move to the point in the buffer where we would expect the suffix to be
1101  const char *ending = RStr->Bf + thisLen - len;
1102  int cmp = strncmp(Str, ending, len);
1103  return cmp == 0;
1104  }
1105 }
TRStr * RStr
Definition: dt.h:414
int Len() const
Definition: dt.h:490
char * Bf
Definition: dt.h:348

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsSuffix ( const TStr Str) const
inline

Definition at line 562 of file dt.h.

References CStr(), and IsSuffix().

562  {
563  return IsSuffix(Str.CStr());}
bool IsSuffix(const char *Str) const
Definition: dt.cpp:1093
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

bool TStr::IsUc ( ) const
inline

Definition at line 494 of file dt.h.

References TRStr::IsUc().

494 {return RStr->IsUc();}
TRStr * RStr
Definition: dt.h:414
bool IsUc() const
Definition: dt.cpp:660

Here is the call graph for this function:

bool TStr::IsUInt ( const bool &  Check,
const uint MnVal,
const uint MxVal,
uint Val 
) const

Definition at line 1176 of file dt.cpp.

References TChRet::Eof(), TChRet::GetCh(), TCh::GetNum(), TCh::IsNum(), TCh::IsWs(), and TStrIn::New().

1177  {
1178  // parsing format {ws} [+]{ddd}
1179  uint _Val=0;
1180  TChRet Ch(TStrIn::New(*this));
1181  while (TCh::IsWs(Ch.GetCh())){}
1182  if (Ch()=='+'){Ch.GetCh();}
1183  if (!TCh::IsNum(Ch())){return false;}
1184  _Val=TCh::GetNum(Ch());
1185  while (TCh::IsNum(Ch.GetCh())){_Val=10*_Val+TCh::GetNum(Ch());}
1186  if (Check&&((_Val<MnVal)||(_Val>MxVal))){return false;}
1187  if (Ch.Eof()){Val=_Val; return true;} else {return false;}
1188 }
static bool IsNum(const char &Ch)
Definition: dt.h:1067
unsigned int uint
Definition: bd.h:11
static bool IsWs(const char &Ch)
Definition: dt.h:1063
static PSIn New(const TStr &Str)
Definition: dt.h:711
static int GetNum(const char &Ch)
Definition: dt.h:1069
Definition: fl.h:535

Here is the call graph for this function:

bool TStr::IsUInt ( uint Val) const
inline

Definition at line 587 of file dt.h.

References IsUInt().

Referenced by IsUInt().

587 {return IsUInt(false, 0, 0, Val);}
bool IsUInt() const
Definition: dt.h:588

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsUInt ( ) const
inline

Definition at line 588 of file dt.h.

References IsUInt().

Referenced by GetUInt(), and IsUInt().

588 {uint Val; return IsUInt(false, 0, 0, Val);}
bool IsUInt() const
Definition: dt.h:588
unsigned int uint
Definition: bd.h:11

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsUInt64 ( const bool &  Check,
const uint64 MnVal,
const uint64 MxVal,
uint64 Val 
) const

Definition at line 1229 of file dt.cpp.

References TChRet::Eof(), TChRet::GetCh(), TCh::GetNum(), TCh::IsNum(), TCh::IsWs(), and TStrIn::New().

1230  {
1231  // parsing format {ws} [+]{ddd}
1232  uint64 _Val=0;
1233  TChRet Ch(TStrIn::New(*this));
1234  while (TCh::IsWs(Ch.GetCh())){}
1235  if (Ch()=='+'){Ch.GetCh();}
1236  if (!TCh::IsNum(Ch())){return false;}
1237  _Val=TCh::GetNum(Ch());
1238  while (TCh::IsNum(Ch.GetCh())){_Val=10*_Val+TCh::GetNum(Ch());}
1239  if (Check&&((_Val<MnVal)||(_Val>MxVal))){return false;}
1240  if (Ch.Eof()){Val=_Val; return true;} else {return false;}
1241 }
static bool IsNum(const char &Ch)
Definition: dt.h:1067
static bool IsWs(const char &Ch)
Definition: dt.h:1063
unsigned long long uint64
Definition: bd.h:38
static PSIn New(const TStr &Str)
Definition: dt.h:711
static int GetNum(const char &Ch)
Definition: dt.h:1069
Definition: fl.h:535

Here is the call graph for this function:

bool TStr::IsUInt64 ( uint64 Val) const
inline

Definition at line 604 of file dt.h.

References IsUInt64().

Referenced by IsUInt64().

604 {return IsUInt64(false, 0, 0, Val);}
bool IsUInt64() const
Definition: dt.h:605

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsUInt64 ( ) const
inline

Definition at line 605 of file dt.h.

References IsUInt64().

Referenced by GetUInt64(), and IsUInt64().

605 {uint64 Val; return IsUInt64(false, 0, 0, Val);}
unsigned long long uint64
Definition: bd.h:38
bool IsUInt64() const
Definition: dt.h:605

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsWcMatch ( const int &  StrBChN,
const TStr WcStr,
const int &  WcStrBChN,
TStrV StarStrV,
const char &  StarCh = '*',
const char &  QuestCh = '?' 
) const

Definition at line 1311 of file dt.cpp.

References TVec< TVal, TSizeTy >::Add(), GetCh(), and Len().

Referenced by GetWcMatch(), and IsWcMatch().

1313  {
1314  int StrLen=Len(); int WcStrLen=WcStr.Len();
1315  int StrChN=StrBChN; int WcStrChN=WcStrBChN;
1316  while ((StrChN<StrLen)&&(WcStrChN<WcStrLen)){
1317  if ((WcStr[WcStrChN]==QuestCh)||(GetCh(StrChN)==WcStr[WcStrChN])){
1318  StrChN++; WcStrChN++;
1319  } else
1320  if (WcStr[WcStrChN]==StarCh){
1321  TChA StarChA; // string substituted by star character
1322  for (int AfterStrChN=StrChN; AfterStrChN<=StrLen; AfterStrChN++){
1323  if (AfterStrChN>StrChN){
1324  StarChA+=GetCh(AfterStrChN-1);}
1325  if (IsWcMatch(AfterStrChN, WcStr, WcStrChN+1, StarStrV, StarCh, QuestCh)){
1326  StarStrV.Add(StarChA); return true;
1327  }
1328  }
1329  return false;
1330  } else {
1331  return false;
1332  }
1333  }
1334  if (StrChN==StrLen){
1335  for (int AfterWcStrChN=WcStrChN; AfterWcStrChN<WcStrLen; AfterWcStrChN++){
1336  if (WcStr[AfterWcStrChN]!=StarCh){return false;}}
1337  return true;
1338  } else {
1339  return false;
1340  }
1341 }
int Len() const
Definition: dt.h:490
bool IsWcMatch(const int &StrBChN, const TStr &WcStr, const int &WcStrBChN, TStrV &StarStrV, const char &StarCh='*', const char &QuestCh='?') const
Definition: dt.cpp:1311
char GetCh(const int &ChN) const
Definition: dt.h:486
Definition: dt.h:201
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:602

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsWcMatch ( const TStr WcStr,
TStrV StarStrV,
const char &  StarCh = '*',
const char &  QuestCh = '?' 
) const

Definition at line 1343 of file dt.cpp.

References IsWcMatch(), and TVec< TVal, TSizeTy >::Reverse().

1344  {
1345  bool WcMatch=IsWcMatch(0, WcStr, 0, StarStrV, StarCh, QuestCh);
1346  if (WcMatch){
1347  StarStrV.Reverse();
1348  return true;
1349  } else {
1350  return false;
1351  }
1352 }
bool IsWcMatch(const int &StrBChN, const TStr &WcStr, const int &WcStrBChN, TStrV &StarStrV, const char &StarCh='*', const char &QuestCh='?') const
Definition: dt.cpp:1311
void Reverse()
Reverses the order of the elements in the vector.
Definition: ds.h:1350

Here is the call graph for this function:

bool TStr::IsWcMatch ( const TStr WcStr,
const char &  StarCh,
const char &  QuestCh 
) const

Definition at line 1354 of file dt.cpp.

References IsWcMatch().

1355  {
1356  TStrV StarStrV;
1357  return IsWcMatch(0, WcStr, 0, StarStrV, StarCh, QuestCh);
1358 }
bool IsWcMatch(const int &StrBChN, const TStr &WcStr, const int &WcStrBChN, TStrV &StarStrV, const char &StarCh='*', const char &QuestCh='?') const
Definition: dt.cpp:1311

Here is the call graph for this function:

bool TStr::IsWcMatch ( const TStr WcStr,
const int &  StarStrN,
TStr StarStr 
) const

Definition at line 1360 of file dt.cpp.

References IsWcMatch(), and TVec< TVal, TSizeTy >::Len().

1360  {
1361  TStrV StarStrV;
1362  if (IsWcMatch(WcStr, StarStrV)){
1363  if (StarStrV.Len()>StarStrN){
1364  StarStr=StarStrV[StarStrV.Len()-StarStrN-1];
1365  } else {
1366  StarStr="";
1367  }
1368  return true;
1369  } else {
1370  return false;
1371  }
1372 }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:575
bool IsWcMatch(const int &StrBChN, const TStr &WcStr, const int &WcStrBChN, TStrV &StarStrV, const char &StarCh='*', const char &QuestCh='?') const
Definition: dt.cpp:1311

Here is the call graph for this function:

bool TStr::IsWcMatch ( const TStr WcStr) const

Definition at line 1374 of file dt.cpp.

References IsWcMatch().

1374  {
1375  TStrV StarStrV;
1376  return IsWcMatch(0, WcStr, 0, StarStrV);
1377 }
bool IsWcMatch(const int &StrBChN, const TStr &WcStr, const int &WcStrBChN, TStrV &StarStrV, const char &StarCh='*', const char &QuestCh='?') const
Definition: dt.cpp:1311

Here is the call graph for this function:

bool TStr::IsWord ( const bool &  WsPrefixP = true,
const bool &  FirstUcAllowedP = true 
) const

Definition at line 1292 of file dt.cpp.

References TChRet::Eof(), TChRet::GetCh(), TCh::IsAlNum(), TCh::IsAlpha(), TCh::IsUc(), TCh::IsWs(), and TStrIn::New().

1292  {
1293  // parsing format {ws} (A-Z,a-z) *{A-Z,a-z,0-9}
1294  TChRet Ch(TStrIn::New(*this));
1295  if (WsPrefixP){while (TCh::IsWs(Ch.GetCh())){}}
1296  else {Ch.GetCh();}
1297  if (!TCh::IsAlpha(Ch())){return false;}
1298  else if (!FirstUcAllowedP&&(TCh::IsUc(Ch()))){return false;}
1299  while (TCh::IsAlNum(Ch.GetCh())){}
1300  if (!Ch.Eof()){return false;}
1301  return true;
1302 }
static bool IsWs(const char &Ch)
Definition: dt.h:1063
static PSIn New(const TStr &Str)
Definition: dt.h:711
static bool IsAlNum(const char &Ch)
Definition: dt.h:1068
static bool IsAlpha(const char &Ch)
Definition: dt.h:1065
static char IsUc(const char &Ch)
Definition: dt.h:1081
Definition: fl.h:535

Here is the call graph for this function:

bool TStr::IsWs ( ) const

Definition at line 1304 of file dt.cpp.

References TChRet::Eof(), TChRet::GetCh(), TCh::IsWs(), and TStrIn::New().

1304  {
1305  // if string is just a bunch of whitespace chars
1306  TChRet Ch(TStrIn::New(*this));
1307  while (TCh::IsWs(Ch.GetCh())){}
1308  return Ch.Eof();
1309 }
static bool IsWs(const char &Ch)
Definition: dt.h:1063
static PSIn New(const TStr &Str)
Definition: dt.h:711
Definition: fl.h:535

Here is the call graph for this function:

char TStr::LastCh ( ) const
inline

Definition at line 487 of file dt.h.

References GetCh(), and Len().

Referenced by TEnv::GetIfArgPrefixBool(), TEnv::GetIfArgPrefixStr(), TStdNotify::OnStatus(), and TStdErrNotify::OnStatus().

487 {return GetCh(Len()-1);}
int Len() const
Definition: dt.h:490
char GetCh(const int &ChN) const
Definition: dt.h:486

Here is the call graph for this function:

Here is the caller graph for this function:

TStr TStr::Left ( const int &  EChN) const
inline

Definition at line 547 of file dt.h.

References GetSubStr(), and Len().

547 { return EChN>0 ? GetSubStr(0, EChN-1) : GetSubStr(0, Len()+EChN-1);}
int Len() const
Definition: dt.h:490
TStr GetSubStr(const int &BChN, const int &EChN) const
Definition: dt.cpp:811

Here is the call graph for this function:

TStr TStr::LeftOf ( const char &  SplitCh) const

Definition at line 873 of file dt.cpp.

References CStr(), GetSubStr(), and Len().

873  {
874  int ThisLen=Len(); const char* ThisBf=CStr();
875  int ChN=0;
876  while ((ChN<ThisLen)&&(ThisBf[ChN]!=SplitCh)){ChN++;}
877  return (ChN==ThisLen) ? "" : GetSubStr(0, ChN-1);
878 }
int Len() const
Definition: dt.h:490
TStr GetSubStr(const int &BChN, const int &EChN) const
Definition: dt.cpp:811
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

TStr TStr::LeftOfLast ( const char &  SplitCh) const

Definition at line 880 of file dt.cpp.

References CStr(), GetSubStr(), and Len().

880  {
881  const char* ThisBf=CStr();
882  int ChN=Len()-1;
883  while ((ChN>=0)&&(ThisBf[ChN]!=SplitCh)){ChN--;}
884  return (ChN==-1) ? "" : GetSubStr(0, ChN-1);
885 }
int Len() const
Definition: dt.h:490
TStr GetSubStr(const int &BChN, const int &EChN) const
Definition: dt.cpp:811
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

int TStr::Len ( ) const
inline

Definition at line 490 of file dt.h.

References TRStr::Len().

Referenced by TJsonVal::AddEscapeChAFromStr(), TBigStrPool::AddStr(), TStrPool::AddStr(), TStrPool64::AddStr(), TTmProfiler::AddTimer(), TBlobBs::AssertVersionStr(), ChangeChAll(), ChangeStr(), ChangeStrAll(), TSnap::CmtyEvolutionJson(), anonymous_namespace{unicode.cpp}::CombinePath(), CountCh(), DelStr(), DelSubStr(), TTable::DenormalizeColName(), TMem::DoFitStr(), TSnap::DrawGViz(), TAGMUtil::FindComsByAGM(), FromHex(), TUrl::GetAbsFromBase(), TEnv::GetArgPostfix(), TBlobBs::GetBlobBsStateStr(), TBlobBs::GetBlockLenV(), GetCStr(), TUrl::GetDmNm(), TUrl::GetDocStrFromUrlStr(), TSecTm::GetDtTmFromDmyStr(), TSecTm::GetDtTmFromHmsStr(), TSecTm::GetDtTmFromMdyHmsPmStr(), TSecTm::GetDtTmFromMdyStr(), TSecTm::GetDtTmFromYmdHmsStr(), THtmlLxChDef::GetEscStr(), TEnv::GetExeFNm(), GetFBase(), GetFExt(), TBlobBs::GetFFreeBlobPtV(), GetFMid(), GetFPath(), THtmlTok::GetFullStr(), TEnv::GetIfArgPrefixBool(), TEnv::GetIfArgPrefixStr(), TEnv::GetIfArgPrefixStrV(), THttpChDef::GetLcStr(), TBlobBs::GetMxSegLen(), TUniChDb::TUcdFileReader::GetNextLine(), GetNrFMid(), GetNrFPath(), GetNrNumFExt(), TTypeNm< Type >::GetNrTypeNm(), TEnv::GetPrefixArgN(), TILx::GetQStr(), TTable::GetSchema(), THttpResp::GetSIn(), TUrlLx::GetStr(), GetSubStr(), TTm::GetTmFromWebLogDateTimeStr(), TTm::GetTmFromWebLogTimeStr(), THtmlDoc::GetTxtLnDoc(), TLxChDef::GetUcStr(), TFile::GetUniqueFNm(), TUnicode::GetUtf8CaseFolded(), TAGMUtil::GVizComGraph(), TUrlLxChDef::InclStr(), TUniChDb::InitLineBreaks(), InsStr(), TBigNet< TNodeData, IsDir >::InvertFromSources(), IsAbsFPath(), TEnv::IsEndOfRun(), THtmlTok::IsHTag(), TLxChDef::IsNmStr(), IsPrefix(), IsSuffix(), TWebPg::IsTxt(), THtmlTok::IsUrlTok(), IsWcMatch(), LastCh(), Left(), LeftOf(), LeftOfLast(), TUniChDb::LoadTxt(), TUniChDb::LoadTxt_ProcessDecomposition(), Mid(), TTable::NormalizeColName(), TMem::operator+=(), TChA::operator+=(), TChA::operator=(), TUniChDb::TUcdFileReader::ParseCodePointRange(), TEnv::PrepArgs(), TTmProfiler::PrintReport(), TXmlLx::PutStr(), THtmlLx::PutStr(), TSOut::PutStr(), TFRnd::PutStr(), TModeNet::RemoveCrossNets(), TTable::RenumberColName(), Right(), RightOf(), RightOfLast(), TAGMFit::RunMCMC(), THtmlDoc::SaveHtmlToXml(), TMAGParam< TNodeAttr >::SaveTxt(), SaveTxt(), TUniChDb::SbEx_Add(), SearchCh(), SearchChBack(), TLxChDef::SetChTy(), THtmlLxChDef::SetChTy(), TXmlChDef::SetChTy(), THttpChDef::SetChTy(), THttpChDef::SetLcCh(), TLxChDef::SetUcCh(), THtmlLxChDef::SetUcCh(), Slice(), SplitOnAllAnyCh(), SplitOnAllCh(), SplitOnCh(), SplitOnLastCh(), SplitOnNonAlNum(), SplitOnStr(), SplitOnWs(), TChA::TChA(), TUniCodec::TestDecodeUtf16(), TUniCodec::TestDecodeUtf8(), TMIn::TMIn(), ToHex(), ToTrunc(), TCodecBase::ToUnicode(), and T8BitCodec< TEncoding_ISO8859_3 >::ToUnicode().

490 {return RStr->Len();}
TRStr * RStr
Definition: dt.h:414
int Len() const
Definition: dt.h:384

Here is the call graph for this function:

Here is the caller graph for this function:

void TStr::Load ( TSIn SIn,
const bool &  IsSmall = false 
)
inline

Definition at line 438 of file dt.h.

References TStr().

438  {
439  *this=TStr(SIn, IsSmall);}
TStr()
Definition: dt.h:423

Here is the call graph for this function:

static TStr TStr::LoadTxt ( const PSIn SIn)
inlinestatic

Definition at line 669 of file dt.h.

References TStr().

Referenced by LoadTxt().

669  {
670  return TStr(SIn);}
TStr()
Definition: dt.h:423

Here is the call graph for this function:

Here is the caller graph for this function:

static TStr TStr::LoadTxt ( const TStr FNm)
inlinestatic

Definition at line 671 of file dt.h.

References LoadTxt(), and TFIn::New().

671  {
672  PSIn SIn=TFIn::New(FNm); return LoadTxt(SIn);}
static PSIn New(const TStr &FNm)
Definition: fl.cpp:290
static TStr LoadTxt(const PSIn &SIn)
Definition: dt.h:669

Here is the call graph for this function:

void TStr::LoadXml ( const PXmlTok XmlTok,
const TStr Nm 
)

Definition at line 740 of file dt.cpp.

References TXmlTok::GetTokStr(), operator=(), and XLoadHd.

740  {
741  XLoadHd(Nm);
742  TStr TokStr=XmlTok->GetTokStr(false);
743  operator=(TokStr);
744 }
#define XLoadHd(Nm)
Definition: bd.h:312
TStr & operator=(const TStr &Str)
Definition: dt.h:445
Definition: dt.h:412

Here is the call graph for this function:

TStr TStr::Mid ( const int &  BChN,
const int &  Chs 
) const
inline

Definition at line 542 of file dt.h.

References GetSubStr().

542 { return GetSubStr(BChN, BChN+Chs-1); }
TStr GetSubStr(const int &BChN, const int &EChN) const
Definition: dt.cpp:811

Here is the call graph for this function:

TStr TStr::Mid ( const int &  BChN) const
inline

Definition at line 543 of file dt.h.

References GetSubStr(), and Len().

543 {return GetSubStr(BChN, Len()-1); }
int Len() const
Definition: dt.h:490
TStr GetSubStr(const int &BChN, const int &EChN) const
Definition: dt.cpp:811

Here is the call graph for this function:

static TStr TStr::MkClone ( const TStr Str)
inlinestatic

Definition at line 691 of file dt.h.

References CStr(), and TStr().

691 {return TStr(Str.CStr());}
char * CStr()
Definition: dt.h:479
TStr()
Definition: dt.h:423

Here is the call graph for this function:

bool TStr::operator!= ( const char *  CStr) const
inline

Definition at line 470 of file dt.h.

References TRStr::CStr(), and CStr().

470  {
471  return strcmp(RStr->CStr(), CStr)!=0;}
TRStr * RStr
Definition: dt.h:414
const char * CStr() const
Definition: dt.h:381
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

char* TStr::operator() ( )
inline

Definition at line 477 of file dt.h.

References TRStr::CStr().

477 {return RStr->CStr();}
TRStr * RStr
Definition: dt.h:414
const char * CStr() const
Definition: dt.h:381

Here is the call graph for this function:

const char* TStr::operator() ( ) const
inline

Definition at line 478 of file dt.h.

References TRStr::CStr().

478 {return RStr->CStr();}
TRStr * RStr
Definition: dt.h:414
const char * CStr() const
Definition: dt.h:381

Here is the call graph for this function:

TStr TStr::operator() ( const int &  BChN,
const int &  EChNP1 
) const
inline

Definition at line 550 of file dt.h.

References Slice().

550 {return Slice(BChN, EChNP1);}
TStr Slice(int BChN, int EChNP1) const
Definition: dt.h:549

Here is the call graph for this function:

TStr& TStr::operator+= ( const TStr Str)
inline

Definition at line 453 of file dt.h.

References TRStr::CStr(), TRStr::MkRef(), Optimize(), RStr, and TRStr::UnRef().

453  {
454  TRStr* NewRStr=new TRStr(RStr->CStr(), Str.RStr->CStr());
455  RStr->UnRef(); RStr=NewRStr; RStr->MkRef();
456  Optimize(); return *this;}
TRStr * RStr
Definition: dt.h:414
const char * CStr() const
Definition: dt.h:381
void UnRef()
Definition: dt.h:379
void Optimize()
Definition: dt.cpp:729
void MkRef()
Definition: dt.h:378
Definition: dt.h:346

Here is the call graph for this function:

TStr& TStr::operator+= ( const char *  CStr)
inline

Definition at line 457 of file dt.h.

References TRStr::CStr(), CStr(), TRStr::MkRef(), Optimize(), and TRStr::UnRef().

457  {
458  TRStr* NewRStr=new TRStr(RStr->CStr(), CStr);
459  RStr->UnRef(); RStr=NewRStr; RStr->MkRef();
460  Optimize(); return *this;}
TRStr * RStr
Definition: dt.h:414
const char * CStr() const
Definition: dt.h:381
void UnRef()
Definition: dt.h:379
void Optimize()
Definition: dt.cpp:729
void MkRef()
Definition: dt.h:378
char * CStr()
Definition: dt.h:479
Definition: dt.h:346

Here is the call graph for this function:

TStr& TStr::operator/ ( const int &  N)
inline

Definition at line 461 of file dt.h.

461  {
462  // no-op, this definition is required by the aaMean table aggregation
463  return *this;}
bool TStr::operator< ( const TStr Str) const
inline

Definition at line 472 of file dt.h.

References TRStr::CStr(), and RStr.

472  {
473  return strcmp(RStr->CStr(), Str.RStr->CStr())<0;}
TRStr * RStr
Definition: dt.h:414
const char * CStr() const
Definition: dt.h:381

Here is the call graph for this function:

TStr& TStr::operator= ( const TStr Str)
inline

Definition at line 445 of file dt.h.

References TRStr::MkRef(), RStr, and TRStr::UnRef().

Referenced by LoadXml().

445  {
446  if (this!=&Str){RStr->UnRef(); RStr=Str.RStr; RStr->MkRef();} return *this;}
TRStr * RStr
Definition: dt.h:414
void UnRef()
Definition: dt.h:379
void MkRef()
Definition: dt.h:378

Here is the call graph for this function:

Here is the caller graph for this function:

TStr& TStr::operator= ( const TChA ChA)
inline

Definition at line 447 of file dt.h.

References TChA::CStr(), GetRStr(), TRStr::MkRef(), and TRStr::UnRef().

447  {
448  RStr->UnRef(); RStr=GetRStr(ChA.CStr()); RStr->MkRef(); return *this;}
TRStr * RStr
Definition: dt.h:414
void UnRef()
Definition: dt.h:379
char * CStr()
Definition: dt.h:255
void MkRef()
Definition: dt.h:378
static TRStr * GetRStr(const char *CStr)
Definition: dt.cpp:719

Here is the call graph for this function:

TStr& TStr::operator= ( const char *  CStr)
inline

Definition at line 449 of file dt.h.

References GetRStr(), TRStr::MkRef(), and TRStr::UnRef().

449  {
450  RStr->UnRef(); RStr=GetRStr(CStr); RStr->MkRef(); return *this;}
TRStr * RStr
Definition: dt.h:414
void UnRef()
Definition: dt.h:379
void MkRef()
Definition: dt.h:378
static TRStr * GetRStr(const char *CStr)
Definition: dt.cpp:719
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

TStr& TStr::operator= ( const char &  Ch)
inline

Definition at line 451 of file dt.h.

References GetChStr(), TRStr::MkRef(), RStr, and TRStr::UnRef().

451  {
452  RStr->UnRef(); RStr=GetChStr(Ch).RStr; RStr->MkRef(); return *this;}
TRStr * RStr
Definition: dt.h:414
void UnRef()
Definition: dt.h:379
void MkRef()
Definition: dt.h:378
static TStr & GetChStr(const char &Ch)
Definition: dt.cpp:1551

Here is the call graph for this function:

bool TStr::operator== ( const TStr Str) const
inline

Definition at line 464 of file dt.h.

References TRStr::CStr(), and RStr.

464  {
465  return (RStr==Str.RStr)||(strcmp(RStr->CStr(), Str.RStr->CStr())==0);}
TRStr * RStr
Definition: dt.h:414
const char * CStr() const
Definition: dt.h:381

Here is the call graph for this function:

bool TStr::operator== ( const char *  CStr) const
inline

Definition at line 466 of file dt.h.

References TRStr::CStr(), and CStr().

466  {
467  return strcmp(RStr->CStr(), CStr)==0;}
TRStr * RStr
Definition: dt.h:414
const char * CStr() const
Definition: dt.h:381
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

char TStr::operator[] ( const int &  ChN) const
inline

Definition at line 474 of file dt.h.

References TRStr::GetCh().

474 {return RStr->GetCh(ChN);}
TRStr * RStr
Definition: dt.h:414
char GetCh(const int &ChN) const
Definition: dt.h:388

Here is the call graph for this function:

void TStr::Optimize ( )
private

Definition at line 729 of file dt.cpp.

References TRStr::CStr(), CStr(), TRStr::GetNullRStr(), TRStr::MkRef(), RStr, and TRStr::UnRef().

Referenced by ChangeChAll(), ConvUsFromYuAscii(), operator+=(), PutCh(), ToCap(), ToLc(), ToUc(), and TStr().

729  {
730  char* CStr=RStr->CStr(); int CStrLen=int(strlen(CStr));
731  TRStr* NewRStr;
732  if (CStrLen==0){NewRStr=TRStr::GetNullRStr();}
733  // next lines are not multi-threading safe
734  //else if (CStrLen==1){NewRStr=GetChStr(CStr[0]).RStr;}
735  //else if (CStrLen==2){NewRStr=GetDChStr(CStr[0], CStr[1]).RStr;}
736  else {NewRStr=RStr;}
737  NewRStr->MkRef(); RStr->UnRef(); RStr=NewRStr;
738 }
TRStr * RStr
Definition: dt.h:414
const char * CStr() const
Definition: dt.h:381
void UnRef()
Definition: dt.h:379
void MkRef()
Definition: dt.h:378
static TRStr * GetNullRStr()
Definition: dt.h:402
char * CStr()
Definition: dt.h:479
Definition: dt.h:346

Here is the call graph for this function:

Here is the caller graph for this function:

void TStr::PutCh ( const int &  ChN,
const char &  Ch 
)
inline

Definition at line 482 of file dt.h.

References TRStr::CStr(), TRStr::MkRef(), Optimize(), TRStr::PutCh(), and TRStr::UnRef().

Referenced by ChangeCh().

482  {
483  TRStr* NewRStr=new TRStr(RStr->CStr());
484  RStr->UnRef(); RStr=NewRStr; RStr->MkRef();
485  RStr->PutCh(ChN, Ch); Optimize();}
TRStr * RStr
Definition: dt.h:414
const char * CStr() const
Definition: dt.h:381
void UnRef()
Definition: dt.h:379
void Optimize()
Definition: dt.cpp:729
void MkRef()
Definition: dt.h:378
void PutCh(const int &ChN, const char &Ch)
Definition: dt.h:386
Definition: dt.h:346

Here is the call graph for this function:

Here is the caller graph for this function:

TStr TStr::PutFBase ( const TStr FNm,
const TStr FBase 
)
static

Definition at line 1511 of file dt.cpp.

References GetFPath().

1511  {
1512  return FNm.GetFPath()+FBase;
1513 }
TStr GetFPath() const
Definition: dt.cpp:1389

Here is the call graph for this function:

TStr TStr::PutFBaseIfEmpty ( const TStr FNm,
const TStr FBase 
)
static

Definition at line 1515 of file dt.cpp.

References Empty(), GetFBase(), and GetFPath().

1515  {
1516  if (FNm.GetFBase().Empty()){
1517  return FNm.GetFPath()+FBase;
1518  } else {
1519  return FNm;
1520  }
1521 }
TStr GetFPath() const
Definition: dt.cpp:1389
bool Empty() const
Definition: dt.h:491
TStr GetFBase() const
Definition: dt.cpp:1396

Here is the call graph for this function:

TStr TStr::PutFExt ( const TStr FNm,
const TStr FExt 
)
static

Definition at line 1499 of file dt.cpp.

References GetFMid(), and GetFPath().

1499  {
1500  return FNm.GetFPath()+FNm.GetFMid()+FExt;
1501 }
TStr GetFMid() const
Definition: dt.cpp:1403
TStr GetFPath() const
Definition: dt.cpp:1389

Here is the call graph for this function:

TStr TStr::PutFExtIfEmpty ( const TStr FNm,
const TStr FExt 
)
static

Definition at line 1503 of file dt.cpp.

References Empty(), GetFExt(), GetFMid(), and GetFPath().

1503  {
1504  if (FNm.GetFExt().Empty()){
1505  return FNm.GetFPath()+FNm.GetFMid()+FExt;
1506  } else {
1507  return FNm;
1508  }
1509 }
TStr GetFMid() const
Definition: dt.cpp:1403
TStr GetFPath() const
Definition: dt.cpp:1389
TStr GetFExt() const
Definition: dt.cpp:1421
bool Empty() const
Definition: dt.h:491

Here is the call graph for this function:

TStr TStr::Reverse ( ) const
inline

Definition at line 569 of file dt.h.

References TChA::Reverse().

569  {
570  TChA ChA(*this); ChA.Reverse(); return ChA;}
Definition: dt.h:201

Here is the call graph for this function:

TStr TStr::Right ( const int &  BChN) const
inline

Definition at line 548 of file dt.h.

References GetSubStr(), and Len().

548 {return BChN>=0 ? GetSubStr(BChN, Len()-1) : GetSubStr(Len()+BChN, Len()-1);}
int Len() const
Definition: dt.h:490
TStr GetSubStr(const int &BChN, const int &EChN) const
Definition: dt.cpp:811

Here is the call graph for this function:

TStr TStr::RightOf ( const char &  SplitCh) const

Definition at line 887 of file dt.cpp.

References CStr(), GetSubStr(), and Len().

887  {
888  int ThisLen=Len(); const char* ThisBf=CStr();
889  int ChN=0;
890  while ((ChN<ThisLen)&&(ThisBf[ChN]!=SplitCh)){ChN++;}
891  return (ChN==ThisLen) ? "" : GetSubStr(ChN+1, ThisLen-1);
892 }
int Len() const
Definition: dt.h:490
TStr GetSubStr(const int &BChN, const int &EChN) const
Definition: dt.cpp:811
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

TStr TStr::RightOfLast ( const char &  SplitCh) const

Definition at line 894 of file dt.cpp.

References CStr(), GetSubStr(), and Len().

894  {
895  int ThisLen=Len(); const char* ThisBf=CStr();
896  int ChN=Len()-1;
897  while ((ChN>=0)&&(ThisBf[ChN]!=SplitCh)){ChN--;}
898  return (ChN==-1) ? "" : GetSubStr(ChN+1, ThisLen-1);
899 }
int Len() const
Definition: dt.h:490
TStr GetSubStr(const int &BChN, const int &EChN) const
Definition: dt.cpp:811
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

void TStr::Save ( TSOut SOut,
const bool &  IsSmall = false 
) const
inline

Definition at line 440 of file dt.h.

References TRStr::Save().

Referenced by TJsonVal::Save(), TGStat::Save(), TNodeInfo::Save(), TDbStr::Save(), and TFlt::Save().

440  {
441  RStr->Save(SOut, IsSmall);}
TRStr * RStr
Definition: dt.h:414
void Save(TSOut &SOut, const bool &IsSmall) const
Definition: dt.h:371

Here is the call graph for this function:

Here is the caller graph for this function:

void TStr::SaveTxt ( const PSOut SOut) const
inline

Definition at line 673 of file dt.h.

References CStr(), Len(), and TSOut::SaveBf().

Referenced by THtmlDoc::SaveHtmlToTxt(), and SaveTxt().

673  {
674  SOut->SaveBf(CStr(), Len());}
int Len() const
Definition: dt.h:490
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

Here is the caller graph for this function:

void TStr::SaveTxt ( const TStr FNm) const
inline

Definition at line 675 of file dt.h.

References TFOut::New(), and SaveTxt().

675  {
676  PSOut SOut=TFOut::New(FNm); SaveTxt(SOut);}
static PSOut New(const TStr &FNm, const bool &Append=false)
Definition: fl.cpp:442
Definition: bd.h:196
void SaveTxt(const PSOut &SOut) const
Definition: dt.h:673

Here is the call graph for this function:

void TStr::SaveXml ( TSOut SOut,
const TStr Nm 
) const

Definition at line 746 of file dt.cpp.

References Empty(), TXmlLx::GetXmlStrFromPlainStr(), TSOut::PutStr(), XSaveBETag, and XSaveHd.

746  {
747  TStr XmlStr=TXmlLx::GetXmlStrFromPlainStr(*this);
748  if (XmlStr.Empty()){XSaveBETag(Nm);}
749  else {XSaveHd(Nm); SOut.PutStr(XmlStr);}
750 }
#define XSaveHd(Nm)
Definition: bd.h:318
#define XSaveBETag(Nm)
Definition: bd.h:324
Definition: dt.h:412
bool Empty() const
Definition: dt.h:491
int PutStr(const char *CStr)
Definition: fl.cpp:117
static TStr GetXmlStrFromPlainStr(const TChA &PlainChA)
Definition: xml.cpp:968

Here is the call graph for this function:

int TStr::SearchCh ( const char &  Ch,
const int &  BChN = 0 
) const

Definition at line 1043 of file dt.cpp.

References CStr(), TInt::GetMx(), and Len().

Referenced by ChangeCh(), ChangeChAll(), TFile::GetUniqueFNm(), TUrl::IsAbs(), IsChIn(), TUniChDb::LoadTxt_ProcessDecomposition(), and TNcpGraphsBase::TNcpGraphsBase().

1043  {
1044  int ThisLen=Len(); const char* ThisBf=CStr();
1045  int ChN=TInt::GetMx(BChN, 0);
1046  while (ChN<ThisLen){
1047  if (ThisBf[ChN]==Ch){return ChN;}
1048  ChN++;
1049  }
1050  return -1;
1051 }
int Len() const
Definition: dt.h:490
static int GetMx(const int &Int1, const int &Int2)
Definition: dt.h:1185
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

Here is the caller graph for this function:

int TStr::SearchChBack ( const char &  Ch,
int  BChN = -1 
) const

Definition at line 1053 of file dt.cpp.

References CStr(), and Len().

Referenced by TNcpGraphsBase::TNcpGraphsBase().

1053  {
1054  const int StrLen=Len();
1055  if (BChN==-1||BChN>=StrLen){BChN=StrLen-1;}
1056  const char* ThisBf=CStr();
1057  const char* Pt=ThisBf + BChN;
1058  while (Pt>=ThisBf) {
1059  if (*Pt==Ch){return (int)(Pt-ThisBf);}
1060  Pt--;
1061  }
1062  return -1;
1063 }
int Len() const
Definition: dt.h:490
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

Here is the caller graph for this function:

int TStr::SearchStr ( const TStr Str,
const int &  BChN = 0 
) const

Definition at line 1065 of file dt.cpp.

References CStr(), and TInt::GetMx().

Referenced by ChangeStr(), DelStr(), TUrl::GetAbsFromBase(), TSnap::Intersect1(), IsStrIn(), TUniChDb::TUcdFileReader::ParseCodePointRange(), SplitOnStr(), and TNcpGraphsBase::TNcpGraphsBase().

1065  {
1066  int NrBChN=TInt::GetMx(BChN, 0);
1067  const char* StrPt=strstr((const char*)CStr()+NrBChN, Str.CStr());
1068  if (StrPt==NULL){return -1;}
1069  else {return int(StrPt-CStr());}
1070 /* // slow implementation
1071  int ThisLen=Len(); int StrLen=Str.Len();
1072  int ChN=TInt::GetMx(BChN, 0);
1073  while (ChN<ThisLen-StrLen+1){
1074  if (strncmp(CStr()+ChN, Str.CStr(), StrLen)==0){
1075  return ChN;}
1076  ChN++;
1077  }
1078  return -1;*/
1079 }
static int GetMx(const int &Int1, const int &Int2)
Definition: dt.h:1185
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

Here is the caller graph for this function:

TStr TStr::Slice ( int  BChN,
int  EChNP1 
) const
inline

Definition at line 549 of file dt.h.

References GetSubStr(), and Len().

Referenced by operator()().

549 { if(BChN<0){BChN=Len()+BChN;} if(EChNP1<=0){EChNP1=Len()+EChNP1;} return GetSubStr(BChN, EChNP1-1); }
int Len() const
Definition: dt.h:490
TStr GetSubStr(const int &BChN, const int &EChN) const
Definition: dt.cpp:811

Here is the call graph for this function:

Here is the caller graph for this function:

void TStr::SplitOnAllAnyCh ( const TStr SplitChStr,
TStrV StrV,
const bool &  SkipEmpty = true 
) const

Definition at line 944 of file dt.cpp.

References TVec< TVal, TSizeTy >::Add(), TVec< TVal, TSizeTy >::Clr(), CStr(), forever, Len(), and TStr().

945  {
946  // reset string output-vector
947  StrV.Clr();
948  // prepare working-copy of string
949  char* Bf=new char[Len()+1];
950  strcpy(Bf, CStr());
951  char* CurStrBf=Bf; // pointer to current string
952  // prepare pointer to split-char-string
953  const char* SplitChBf=SplitChStr.CStr();
954  forever{
955  char* BfC=CurStrBf; // set the counter for working-string
956  while (*BfC!=0){
957  const char* SplitChBfC=SplitChBf; // set counter for split-char-string
958  while ((*SplitChBfC!=0)&&(*SplitChBfC!=*BfC)){SplitChBfC++;}
959  if (*SplitChBfC!=0){break;} // if split-char found
960  BfC++;
961  }
962  bool IsEnd=(*BfC==0);
963  *BfC=0;
964  if ((BfC>CurStrBf)||(!SkipEmpty)){StrV.Add(TStr(CurStrBf));}
965  if (IsEnd){break;}
966  CurStrBf=BfC+1;
967  }
968  // delete working-copy
969  delete[] Bf;
970 }
int Len() const
Definition: dt.h:490
#define forever
Definition: bd.h:6
void Clr(const bool &DoDel=true, const TSizeTy &NoDelLim=-1)
Clears the contents of the vector.
Definition: ds.h:1022
char * CStr()
Definition: dt.h:479
TStr()
Definition: dt.h:423
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:602

Here is the call graph for this function:

void TStr::SplitOnAllCh ( const char &  SplitCh,
TStrV StrV,
const bool &  SkipEmpty = true 
) const

Definition at line 926 of file dt.cpp.

References TVec< TVal, TSizeTy >::Add(), TVec< TVal, TSizeTy >::Clr(), CStr(), forever, Len(), and TStr().

Referenced by TNetInfBs::AddCasc(), TNIBs::AddCasc(), TNIBs::BSG(), THttpResp::GetCookieKeyValDmPathQuV(), TMAGAffMtx::GetMtx(), TKronMtx::GetMtx(), TUniChDb::TUcdFileReader::GetNextLine(), TUrl::GetTopDownDocNm(), TUInt::GetUIntFromIpStr(), TUInt::IsIpStr(), TUInt::IsIpv6Str(), TTimeNet::LoadAmazon(), TNetInfBs::LoadCascadesTxt(), TNIBs::LoadCascadesTxt(), TNIBs::LoadGroundTruthNodesTxt(), TNetInfBs::LoadGroundTruthTxt(), TNIBs::LoadGroundTruthTxt(), TNIBs::LoadInferredNodesTxt(), TNIBs::LoadInferredTxt(), TTimeNet::LoadPatents(), TUniChDb::SbEx_AddMulti(), TNIBs::SG(), and TEnv::TEnv().

927  {
928  StrV.Clr();
929  char* Bf=new char[Len()+1];
930  strcpy(Bf, CStr());
931  char* CurStrBf=Bf;
932  forever{
933  char* BfC=CurStrBf;
934  while ((*BfC!=0)&&(*BfC!=SplitCh)){BfC++;}
935  bool IsEnd=(*BfC=='\0');
936  *BfC=0;
937  if ((BfC>CurStrBf)||(!SkipEmpty)){StrV.Add(TStr(CurStrBf));}
938  if (IsEnd){break;}
939  CurStrBf=BfC+1;
940  }
941  delete[] Bf;
942 }
int Len() const
Definition: dt.h:490
#define forever
Definition: bd.h:6
void Clr(const bool &DoDel=true, const TSizeTy &NoDelLim=-1)
Clears the contents of the vector.
Definition: ds.h:1022
char * CStr()
Definition: dt.h:479
TStr()
Definition: dt.h:423
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:602

Here is the call graph for this function:

Here is the caller graph for this function:

void TStr::SplitOnCh ( TStr LStr,
const char &  SplitCh,
TStr RStr 
) const

Definition at line 901 of file dt.cpp.

References CStr(), GetSubStr(), and Len().

Referenced by TXmlTok::GetTagTok(), TXmlDoc::GetTagTok(), TEnv::GetVarNmV(), TTimeNet::LoadPatents(), TSnap::ReadEdgeSchemaFromFile(), and TSnap::ReadNodeSchemaFromFile().

901  {
902  int ThisLen=Len(); const char* ThisBf=CStr();
903  int ChN=0;
904  while ((ChN<ThisLen)&&(ThisBf[ChN]!=SplitCh)){ChN++;}
905  if (ChN==ThisLen){
906  LStr=GetSubStr(0, ThisLen-1); RStr="";
907  } else {
908  LStr=GetSubStr(0, ChN-1); RStr=GetSubStr(ChN+1, ThisLen-1);
909  }
910 }
int Len() const
Definition: dt.h:490
TStr GetSubStr(const int &BChN, const int &EChN) const
Definition: dt.cpp:811
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

Here is the caller graph for this function:

void TStr::SplitOnLastCh ( TStr LStr,
const char &  SplitCh,
TStr RStr 
) const

Definition at line 912 of file dt.cpp.

References CStr(), GetSubStr(), and Len().

Referenced by TXmlTok::GetTagTokV(), and TXmlDoc::GetTagTokV().

912  {
913  int ThisLen=Len(); const char* ThisBf=CStr();
914  int ChN=Len()-1;
915  while ((ChN>=0)&&(ThisBf[ChN]!=SplitCh)){ChN--;}
916  if (ChN==-1){
917  LStr=""; RStr=*this;
918  } else
919  if (ChN==0){
920  LStr=""; RStr=GetSubStr(1, ThisLen-1);
921  } else {
922  LStr=GetSubStr(0, ChN-1); RStr=GetSubStr(ChN+1, ThisLen-1);
923  }
924 }
int Len() const
Definition: dt.h:490
TStr GetSubStr(const int &BChN, const int &EChN) const
Definition: dt.cpp:811
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

Here is the caller graph for this function:

void TStr::SplitOnNonAlNum ( TStrV StrV) const

Definition at line 990 of file dt.cpp.

References TVec< TVal, TSizeTy >::Add(), TVec< TVal, TSizeTy >::Clr(), CStr(), forever, TCh::IsAlNum(), Len(), and TStr().

Referenced by TUrl::GetDocStrFromUrlStr().

990  {
991  StrV.Clr();
992  char* Bf=new char[Len()+1];
993  strcpy(Bf, CStr());
994  char* StrBf=Bf;
995  forever{
996  while ((*StrBf!=0)&&(!TCh::IsAlNum(*StrBf))){StrBf++;}
997  char* BfC=StrBf;
998  while ((*BfC!=0)&&(TCh::IsAlNum(*BfC))){BfC++;}
999  bool IsEnd=(*BfC=='\0');
1000  *BfC=0;
1001  if (BfC>StrBf){StrV.Add(TStr(StrBf));}
1002  if (IsEnd){break;}
1003  StrBf=BfC+1;
1004  }
1005  delete[] Bf;
1006 }
int Len() const
Definition: dt.h:490
#define forever
Definition: bd.h:6
void Clr(const bool &DoDel=true, const TSizeTy &NoDelLim=-1)
Clears the contents of the vector.
Definition: ds.h:1022
static bool IsAlNum(const char &Ch)
Definition: dt.h:1068
char * CStr()
Definition: dt.h:479
TStr()
Definition: dt.h:423
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:602

Here is the call graph for this function:

Here is the caller graph for this function:

void TStr::SplitOnStr ( const TStr SplitStr,
TStrV StrV 
) const

Definition at line 1008 of file dt.cpp.

References TVec< TVal, TSizeTy >::Add(), TVec< TVal, TSizeTy >::Clr(), GetSubStr(), Len(), and SearchStr().

Referenced by THtmlTok::IsUrlTok().

1008  {
1009  StrV.Clr();
1010  int SplitStrLen=SplitStr.Len();
1011  int PrevChN=0; int ChN=0;
1012  while ((ChN=SearchStr(SplitStr, ChN))!=-1){
1013  // extract & add string
1014  TStr SubStr=GetSubStr(PrevChN, ChN-1);
1015  StrV.Add(SubStr);
1016  PrevChN=ChN=ChN+SplitStrLen;
1017  }
1018  // add last string
1019  TStr LastSubStr=GetSubStr(PrevChN, Len()-1);
1020  StrV.Add(LastSubStr);
1021 }
int Len() const
Definition: dt.h:490
TStr GetSubStr(const int &BChN, const int &EChN) const
Definition: dt.cpp:811
void Clr(const bool &DoDel=true, const TSizeTy &NoDelLim=-1)
Clears the contents of the vector.
Definition: ds.h:1022
int SearchStr(const TStr &Str, const int &BChN=0) const
Definition: dt.cpp:1065
Definition: dt.h:412
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:602

Here is the call graph for this function:

Here is the caller graph for this function:

void TStr::SplitOnStr ( TStr LeftStr,
const TStr MidStr,
TStr RightStr 
) const

Definition at line 1023 of file dt.cpp.

References GetNullStr(), GetSubStr(), Len(), and SearchStr().

1023  {
1024  const int ChN=SearchStr(MidStr);
1025  if (ChN==-1){
1026  LeftStr=*this; RightStr=GetNullStr();
1027  } else {
1028  LeftStr=GetSubStr(0, ChN-1);
1029  RightStr=GetSubStr(ChN+MidStr.Len(), Len()-1);
1030  }
1031 }
int Len() const
Definition: dt.h:490
TStr GetSubStr(const int &BChN, const int &EChN) const
Definition: dt.cpp:811
int SearchStr(const TStr &Str, const int &BChN=0) const
Definition: dt.cpp:1065
static TStr GetNullStr()
Definition: dt.cpp:1626

Here is the call graph for this function:

void TStr::SplitOnWs ( TStrV StrV) const

Definition at line 972 of file dt.cpp.

References TVec< TVal, TSizeTy >::Add(), TVec< TVal, TSizeTy >::Clr(), CStr(), forever, TCh::IsWs(), Len(), and TStr().

Referenced by TZipIn::GetFLen(), TTimeNet::LoadArxiv(), TUniChDb::TUcdFileReader::ParseCodePointList(), TUnicode::RegisterCodec(), and TUnicode::UnregisterCodec().

972  {
973  StrV.Clr();
974  char* Bf=new char[Len()+1];
975  strcpy(Bf, CStr());
976  char* StrBf=Bf;
977  forever{
978  while ((*StrBf!=0)&&(TCh::IsWs(*StrBf))){StrBf++;}
979  char* BfC=StrBf;
980  while ((*BfC!=0)&&(!TCh::IsWs(*BfC))){BfC++;}
981  bool IsEnd=(*BfC=='\0');
982  *BfC=0;
983  if (BfC>StrBf){StrV.Add(TStr(StrBf));}
984  if (IsEnd){break;}
985  StrBf=BfC+1;
986  }
987  delete[] Bf;
988 }
int Len() const
Definition: dt.h:490
#define forever
Definition: bd.h:6
static bool IsWs(const char &Ch)
Definition: dt.h:1063
void Clr(const bool &DoDel=true, const TSizeTy &NoDelLim=-1)
Clears the contents of the vector.
Definition: ds.h:1022
char * CStr()
Definition: dt.h:479
TStr()
Definition: dt.h:423
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:602

Here is the call graph for this function:

Here is the caller graph for this function:

TStr & TStr::ToCap ( )

Definition at line 764 of file dt.cpp.

References TRStr::CStr(), TRStr::MkRef(), Optimize(), RStr, TRStr::ToCap(), and TRStr::UnRef().

Referenced by TSecTm::GetDtTmFromDmyStr().

764  {
765  TRStr* NewRStr=new TRStr(RStr->CStr()); NewRStr->ToCap();
766  RStr->UnRef(); RStr=NewRStr; RStr->MkRef();
767  Optimize(); return *this;
768 }
TRStr * RStr
Definition: dt.h:414
const char * CStr() const
Definition: dt.h:381
void ToCap()
Definition: dt.cpp:685
void UnRef()
Definition: dt.h:379
void Optimize()
Definition: dt.cpp:729
void MkRef()
Definition: dt.h:378
Definition: dt.h:346

Here is the call graph for this function:

Here is the caller graph for this function:

TStr & TStr::ToHex ( )

Definition at line 785 of file dt.cpp.

References TRStr::Bf, TCh::GetHexCh(), Len(), and RStr.

785  {
786  TChA ChA;
787  int StrLen=Len();
788  for (int ChN=0; ChN<StrLen; ChN++){
789  uchar Ch=uchar(RStr->Bf[ChN]);
790  char MshCh=TCh::GetHexCh((Ch/16)%16);
791  char LshCh=TCh::GetHexCh(Ch%16);
792  ChA+=MshCh; ChA+=LshCh;
793  }
794  *this=ChA;
795  return *this;
796 }
TRStr * RStr
Definition: dt.h:414
int Len() const
Definition: dt.h:490
static char GetHexCh(const int &Val)
Definition: dt.h:1077
char * Bf
Definition: dt.h:348
unsigned char uchar
Definition: bd.h:10
Definition: dt.h:201

Here is the call graph for this function:

TStr & TStr::ToLc ( )

Definition at line 758 of file dt.cpp.

References TRStr::CStr(), TRStr::MkRef(), Optimize(), RStr, TRStr::ToLc(), and TRStr::UnRef().

Referenced by TUrl::ToLcPath().

758  {
759  TRStr* NewRStr=new TRStr(RStr->CStr()); NewRStr->ToLc();
760  RStr->UnRef(); RStr=NewRStr; RStr->MkRef();
761  Optimize(); return *this;
762 }
TRStr * RStr
Definition: dt.h:414
void ToLc()
Definition: dt.cpp:679
const char * CStr() const
Definition: dt.h:381
void UnRef()
Definition: dt.h:379
void Optimize()
Definition: dt.cpp:729
void MkRef()
Definition: dt.h:378
Definition: dt.h:346

Here is the call graph for this function:

Here is the caller graph for this function:

TStr & TStr::ToTrunc ( )

Definition at line 770 of file dt.cpp.

References CStr(), GetSubStr(), TCh::IsWs(), and Len().

Referenced by THttpResp::GetCookieKeyValDmPathQuV(), TUniChDb::TUcdFileReader::GetNextLine(), TUniChDb::LoadTxt_ProcessDecomposition(), and TUrl::TUrl().

770  {
771  int ThisLen=Len(); char* ThisBf=CStr();
772  int BChN=0; int EChN=ThisLen-1;
773  while ((BChN<ThisLen)&&TCh::IsWs(ThisBf[BChN])){BChN++;}
774  while ((EChN>=0)&&TCh::IsWs(ThisBf[EChN])){EChN--;}
775  *this=GetSubStr(BChN, EChN);
776  return *this;
777 }
int Len() const
Definition: dt.h:490
TStr GetSubStr(const int &BChN, const int &EChN) const
Definition: dt.cpp:811
static bool IsWs(const char &Ch)
Definition: dt.h:1063
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

Here is the caller graph for this function:

TStr & TStr::ToUc ( )

Definition at line 752 of file dt.cpp.

References TRStr::CStr(), TRStr::MkRef(), Optimize(), RStr, TRStr::ToUc(), and TRStr::UnRef().

Referenced by TFFile::TFFile().

752  {
753  TRStr* NewRStr=new TRStr(RStr->CStr()); NewRStr->ToUc();
754  RStr->UnRef(); RStr=NewRStr; RStr->MkRef();
755  Optimize(); return *this;
756 }
TRStr * RStr
Definition: dt.h:414
const char * CStr() const
Definition: dt.h:381
void UnRef()
Definition: dt.h:379
void Optimize()
Definition: dt.cpp:729
void MkRef()
Definition: dt.h:378
void ToUc()
Definition: dt.cpp:667
Definition: dt.h:346

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

TStr operator+ ( const TStr LStr,
const TStr RStr 
)
friend

Definition at line 1631 of file dt.cpp.

1631  {
1632  if (LStr.Empty()){return RStr;}
1633  else if (RStr.Empty()){return LStr;}
1634  else {return TStr(LStr)+=RStr;}
1635 }
TRStr * RStr
Definition: dt.h:414
bool Empty() const
Definition: dt.h:491
TStr()
Definition: dt.h:423
TStr operator+ ( const TStr LStr,
const char *  RCStr 
)
friend

Definition at line 1637 of file dt.cpp.

1637  {
1638  return TStr(LStr)+=RCStr;
1639 }
TStr()
Definition: dt.h:423

Member Data Documentation


The documentation for this class was generated from the following files: