SNAP Library 2.0, Developer Reference  2013-05-13 16:33:57
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TStr Class Reference

#include <dt.h>

Inheritance diagram for TStr:
Collaboration diagram for TStr:

List of all members.

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)
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   
) [inline, private]

Definition at line 416 of file dt.h.

References TRStr::MkRef(), and RStr.

                            {
    RStr=new TRStr(Ch); RStr->MkRef();}

Here is the call graph for this function:

TStr::TStr ( const char &  Ch1,
const char &  Ch2,
bool   
) [inline, private]

Definition at line 418 of file dt.h.

References TRStr::MkRef(), and RStr.

                                              {
    RStr=new TRStr(Ch1, Ch2); RStr->MkRef();}

Here is the call graph for this function:

TStr::TStr ( ) [inline]

Definition at line 423 of file dt.h.

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

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().

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.

{RStr=Str.RStr; RStr->MkRef();}

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(), TRStr::MkRef(), and RStr.

{RStr=GetRStr(ChA.CStr()); RStr->MkRef();}

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(), TRStr::MkRef(), and RStr.

{RStr=GetRStr(SStr.CStr()); RStr->MkRef();}

Here is the call graph for this function:

TStr::TStr ( const char *  CStr) [inline]

Definition at line 427 of file dt.h.

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

Here is the call graph for this function:

TStr::TStr ( const char &  Ch) [inline, explicit]

Definition at line 428 of file dt.h.

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

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(), Optimize(), and RStr.

                       {
    RStr=new TRStr(Mem.Len()); RStr->MkRef();
    memcpy(CStr(), Mem(), Mem.Len()); Optimize();}

Here is the call graph for this function:

TStr::TStr ( const PSIn SIn) [inline, explicit]

Definition at line 432 of file dt.h.

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

                                {
    int SInLen=SIn->Len(); RStr=new TRStr(SInLen); RStr->MkRef();
    SIn->GetBf(CStr(), SInLen); Optimize();}

Here is the call graph for this function:

TStr::~TStr ( ) [inline]

Definition at line 435 of file dt.h.

References RStr, and TRStr::UnRef().

{RStr->UnRef();}

Here is the call graph for this function:

TStr::TStr ( TSIn SIn,
const bool &  IsSmall = false 
) [inline, explicit]

Definition at line 436 of file dt.h.

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

                                                     :
    RStr(new TRStr(SIn, IsSmall)){RStr->MkRef(); Optimize();}

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().

                                                        {
  return FNm.GetFPath()+FNm.GetFMid()+ExtFMid+FNm.GetFExt();
}

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().

                                                                       {
  int ChN=SearchCh(SrcCh, BChN);
  if (ChN!=-1){PutCh(ChN, DstCh);}
  return ChN;
}

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 TMAGAffMtx::GetMtx(), and TKronMtx::GetMtx().

                                                         {
  int FirstChN=SearchCh(SrcCh);
  if (FirstChN==-1){
    return 0;
  } else {
    TRStr* NewRStr=new TRStr(RStr->CStr());
    RStr->UnRef(); RStr=NewRStr; RStr->MkRef();
    char* ThisBf=CStr(); int StrLen=Len(); int Changes=0;
    for (int ChN=FirstChN; ChN<StrLen; ChN++){
      // slow: if (GetCh(ChN)==SrcCh){RStr->PutCh(ChN, DstCh); Changes++;}
      if (ThisBf[ChN]==SrcCh){ThisBf[ChN]=DstCh; Changes++;}
    }
    Optimize();
    return Changes;
  }
}

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().

                                                                          {
  int ChN=SearchStr(SrcStr, BChN);
  if (ChN==-1){
    return -1;
  } else {
    DelSubStr(ChN, ChN+SrcStr.Len()-1);
    InsStr(ChN, DstStr);
    return ChN;
  }
}

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().

                                                                                    {
  const int DstStrLen=DstStr.Len();
  int Changes=0-1; int BChN=0-DstStrLen;
  do {
    Changes++;
    if (FromStartP){BChN=0-DstStrLen;}
    BChN+=DstStrLen;
    BChN=ChangeStr(SrcStr, DstStr, BChN);
  } while (BChN!=-1);
  return Changes;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void TStr::Clr ( ) [inline]

Definition at line 486 of file dt.h.

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

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

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 494 of file dt.h.

References CStr().

Referenced by EqI().

{return TRStr::CmpI(CStr(), Str.CStr());}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 779 of file dt.cpp.

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

                             {
  TRStr* NewRStr=new TRStr(RStr->CStr()); NewRStr->ConvUsFromYuAscii();
  RStr->UnRef(); RStr=NewRStr; RStr->MkRef();
  Optimize(); return *this;
}

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().

                                                       {
  const int ThisLen=Len();
  const char* ThisBf=CStr();
  int Chs=0;
  for (int ChN=TInt::GetMx(BChN, 0); ChN<ThisLen; ChN++){
    if (ThisBf[ChN]==Ch){Chs++;}
  }
  return Chs;
}

Here is the call graph for this function:

char* TStr::CStr ( ) [inline]

Definition at line 476 of file dt.h.

References TRStr::CStr(), and RStr.

Referenced by TStrHash< TDat, TStringPool, THashFunc >::AddDat(), TStrHash< TDat, TStringPool, THashFunc >::AddDatId(), TGnuPlot::AddErrBar(), TGnuPlot::AddFunc(), TStrHash< TDat, TStringPool, THashFunc >::AddKey(), TGnuPlot::AddPlot(), TBigStrPool::AddStr(), TStrPool::AddStr(), TStrPool64::AddStr(), anonymous_namespace{unicode.cpp}::AssertEq(), TKroneckerLL::ChainGelmapRubinPlot(), ChangeChAll(), CmpI(), CountCh(), TGnuPlot::CreatePlotFile(), TZipIn::CreateZipProcess(), TZipOut::CreateZipProcess(), TFile::Del(), TDir::DelDir(), DelSubStr(), TGHash< TDat >::DrawGViz(), TLocClust::DrawWhiskers(), TMAGAffMtx::Dump(), TKronMtx::Dump(), TCnCom::Dump(), TBigNet< TNodeData, IsDir >::Dump(), TSimpleGraph::Dump(), TAGMUtil::DumpCmtyVV(), TTimeNENet::DumpTimeStat(), EqI(), ErrNotify(), TDir::GenDir(), TZipIn::GetCmd(), TZipOut::GetCmd(), GetCStr(), TBigStrPool::GetCStr(), TStrPool::GetCStr(), TBigStrPool::GetCStrFromOffset(), TExeTm::GetCurTm(), TStrHash< TDat, TStringPool, THashFunc >::GetDat(), TSecTm::GetDtStr(), GetFBase(), GetFExt(), TZipIn::GetFLen(), GetFMid(), GetFPath(), TEnv::GetIfArgPrefixBool(), TEnv::GetIfArgPrefixFlt(), TEnv::GetIfArgPrefixInt(), TEnv::GetIfArgPrefixStr(), TEnv::GetIfArgPrefixStrV(), TStrHash< TDat, TStringPool, THashFunc >::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(), TBigNet< TNodeData, IsDir >::InvertFromSources(), TEnv::IsArgStr(), IsFlt(), TStrHash< TDat, TStringPool, THashFunc >::IsKey(), TStrHash< TDat, TStringPool, THashFunc >::IsKeyGetDat(), TNodeNet< TNodeData >::IsOk(), TUNGraph::IsOk(), TNGraph::IsOk(), TNodeEDatNet< TNodeData, TEdgeData >::IsOk(), TNEGraph::IsOk(), TBPGraph::IsOk(), TNodeEdgeNet< TNodeData, TEdgeData >::IsOk(), TChA::IsPrefix(), IsPrefix(), TChA::IsSuffix(), IsSuffix(), 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(), TTimeNet::LoadPatents(), TMAGNodeSimple::LoadTxt(), TMAGNodeBern::LoadTxt(), TMAGNodeBeta::LoadTxt(), TMAGParam< TNodeAttr >::LoadTxt(), TUniCaseFolding::LoadTxt(), TUniChDb::LoadTxt(), MkClone(), 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+=(), TCon::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(), TTimeNet::PlotMedianDegOverTm(), TTimeNet::PlotMissingPast(), TTimeNENet::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(), PlotTrueAndEst(), 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(), TGLib_OLD::TVec< TVal >::Resize(), TVecPool< TVal, TSizeTy >::Resize(), RightOf(), RightOfLast(), TGnuPlot::RunGnuPlot(), TAGMUtil::SaveBipartiteGephi(), TGHash< TDat >::SaveDetailTxt(), TNetInfBs::SaveEdgeInfo(), TSnap::SaveEdgeList(), TTimeNENet::SaveEdgeTm(), TGnuPlot::SaveEps(), TAGMUtil::SaveGephi(), TSnap::SaveGViz(), TGraphKey::SaveGViz(), THtmlDoc::SaveHtmlToXml(), TSnap::SaveMatlabSparseMtx(), TSnap::SavePajek(), TLocClust::SavePajek(), TNetInfBs::SavePajek(), TNetInfBs::SavePlaneTextNet(), TGnuPlot::SavePng(), 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(), TChA::TChA(), TUniCodec::TestDecodeUtf16(), TUniCodec::TestDecodeUtf8(), TUniChDb::TestFindNextWordOrSentenceBoundary(), TKroneckerLL::TestGradDescent(), TKroneckerLL::TestSamplePerm(), TUniCodec::TestUtf16(), TUniCodec::TestUtf8(), TUniChDb::TestWbFindNonIgnored(), TFIn::TFIn(), TFInOut::TFInOut(), TFOut::TFOut(), TTimeNENet::TimeGrowth(), TMem::TMem(), TMIn::TMIn(), TNcpGraphsBase::TNcpGraphsBase(), ToTrunc(), TSparseRowMatrix::TSparseRowMatrix(), TStr(), TVecPool< TVal, TSizeTy >::TVecPool(), TWChA::TWChA(), TZipIn::TZipIn(), TFPathNotify::UpdateSOut(), WarnNotify(), and TUniChDb::TSubcatHelper::~TSubcatHelper().

{return RStr->CStr();}

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 477 of file dt.h.

References TRStr::CStr(), and RStr.

{return RStr->CStr();}

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().

                                 {
  TChA ChA(*this);
  int ChN=ChA.SearchCh(Ch);
  while (ChN!=-1){
    ChA.Del(ChN);
    ChN=ChA.SearchCh(Ch);
  }
  *this=ChA;
}

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().

                                {
  int ChN=SearchStr(Str);
  if (ChN==-1){
    return false;
  } else {
    DelSubStr(ChN, ChN+Str.Len()-1);
    return true;
  }
}

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().

                                                      {
  int BChN=TInt::GetMx(_BChN, 0);
  int EChN=TInt::GetMn(_EChN, Len()-1);
  int Chs=Len()-(EChN-BChN+1);
  if (Chs==0){Clr();}
  else if (Chs<Len()){
    char* Bf=new char[Chs+1]; strncpy(Bf, CStr(), BChN);
    strncpy(Bf+BChN, CStr()+EChN+1, Len()-EChN-1); Bf[Chs]=0;
    TStr Str(Bf); delete[] Bf;
    *this=Str;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::Empty ( ) const [inline]

Definition at line 488 of file dt.h.

References TRStr::Empty(), and RStr.

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(), TAGMFast::FindComsByCV(), TUrl::GetAbs(), TUrl::GetAbsFromBase(), THttpResp::GetCookieKeyValDmPathQuV(), TSs::GetFldX(), TSs::GetFldY(), GetNrAbsFPath(), TGBlobBs::GetNrBlobBsFNm(), GetNrFExt(), TExpHelp::GetObjHdNmV(), TXmlLx::GetPEReference(), TPp::GetPp(), TXmlLx::GetReference(), TGnuPlot::GetSeriesPlotStr(), THttpLx::GetSpec(), TXmlObjSer::GetTagNm(), TXmlTok::GetTagTok(), TXmlDoc::GetTagTok(), THttpLx::GetToken(), TKroneckerLL::GradDescentConvergence(), TGStatVec::ImposeDistr(), TLocClustStat::ImposeNCP(), TUniChDb::InitSpecialCasing(), TEnv::IsEndOfRun(), TUrl::IsSite(), THtmlTok::IsUrlTok(), TUniChDb::LoadTxt(), TUniChDb::LoadTxt_ProcessDecomposition(), TAGMFast::MLEGradAscent(), TAGMFit::MLEGradAscentGivenCAG(), TAGMFast::MLEGradAscentParallel(), TLogRegFit::MLEGradient(), TAGMFast::MLENewton(), TLogRegFit::MLENewton(), TStdNotify::OnStatus(), TStdErrNotify::OnStatus(), operator+(), TGStat::Plot(), TGStatVec::Plot(), TLocClustStat::PlotBestClustDens(), TTimeNet::PlotCCfOverTm(), TSnap::PlotClustCf(), TLocClust::PlotCutDistr(), TSnap::PlotEigValDistr(), TSnap::PlotEigValRank(), TSnap::PlotInDegDistr(), TSnap::PlotInvParticipRat(), 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(), TSnap::SaveEdgeList(), TGnuPlot::SaveEps(), TSnap::SaveGViz(), TGraphKey::SaveGViz(), THtmlDoc::SaveHtmlToXml(), TGnuPlot::SavePng(), TGnuPlot::SaveTs(), TCnCom::SaveTxt(), TPp::SaveTxt(), SaveXml(), TFFile::TFFile(), TFIn::TFIn(), TGnuPlot::TGnuPlot(), THttpResp::THttpResp(), THttpRq::THttpRq(), TUrl::ToLcPath(), TPreproc::TPreproc(), TXmlObjSerTagNm::TXmlObjSerTagNm(), TZipIn::TZipIn(), TZipOut::TZipOut(), and TXmlObjSerTagNm::~TXmlObjSerTagNm().

{return RStr->Empty();}

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 495 of file dt.h.

References CmpI(), and CStr().

{return TRStr::CmpI(CStr(), Str.CStr())==0;}

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 TNodeNet< TNodeData >::AddEdge(), TUNGraph::AddEdge(), TNGraph::AddEdge(), TNodeEDatNet< TNodeData, TEdgeData >::AddEdge(), TNEGraph::AddEdge(), TBPGraph::AddEdge(), TNodeEdgeNet< TNodeData, TEdgeData >::AddEdge(), TJsonVal::AddEscapeChAFromStr(), TGnuPlot::AddExpFit(), TGnuPlot::AddFunc(), TGnuPlot::AddLinFit(), TGnuPlot::AddLogFit(), TBigNet< TNodeData, IsDir >::AddNode(), TNodeNet< TNodeData >::AddNode(), TUNGraph::AddNode(), TNGraph::AddNode(), TNodeEDatNet< TNodeData, TEdgeData >::AddNode(), TNEGraph::AddNode(), TBPGraph::AddNode(), TNodeEdgeNet< TNodeData, TEdgeData >::AddNode(), TGnuPlot::AddPwrFit1(), TGnuPlot::AddPwrFit2(), TGnuPlot::AddPwrFit3(), TBigNet< TNodeData, IsDir >::AddUndirNode(), TKroneckerLL::ChainGelmapRubinPlot(), TZipIn::CreateZipProcess(), TZipOut::CreateZipProcess(), TNodeNet< TNodeData >::DelEdge(), TUNGraph::DelEdge(), TNGraph::DelEdge(), TNodeEDatNet< TNodeData, TEdgeData >::DelEdge(), TBPGraph::DelEdge(), TUNGraph::DelNode(), TBPGraph::DelNode(), TLinAlg::DotProduct(), TGHash< TDat >::DrawGViz(), TLocClust::DrawWhiskers(), TSsParser::DumpStr(), TUnicode::EncodeUtf8(), 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(), TUInt64::GetHexStr(), TBigNet< TNodeData, IsDir >::GetInNIdV(), 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(), TInt::GetStr(), TUInt64::GetStr(), TUInt::GetStrFromIpUInt(), TXmlParser::GetTag(), TXmlParser::GetTagVal(), TSecTm::GetTmMinStr(), TSecTm::GetTmSec(), TSecTm::GetTmStr(), TUInt::GetUIntFromIpStr(), TFile::GetUniqueFNm(), TSecTm::GetYmdTmStr(), TKroneckerLL::GradDescentConvergence(), TAGMUtil::GVizComGraph(), TSnap::TSnapDetail::GVizDoLayout(), TGStatVec::ImposeDistr(), TLocClustStat::ImposeNCP(), TGraphAnf< PGraph >::InitAnfBits(), TBigNet< TNodeData, IsDir >::IsOk(), TNodeNet< TNodeData >::IsOk(), TUNGraph::IsOk(), TNGraph::IsOk(), TNodeEDatNet< TNodeData, TEdgeData >::IsOk(), TNEGraph::IsOk(), TBPGraph::IsOk(), TNodeEdgeNet< TNodeData, TEdgeData >::IsOk(), TSparseSVD::Lanczos(), 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(), 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(), TEnv::PutVarVal(), TVec< TVal, TSizeTy >::Resize(), TBigStrPool::Resize(), TStrPool::Resize(), TStrPool64::Resize(), TGLib_OLD::TVec< TVal >::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().

                                     {
  char Bf[10*1024];
  va_list valist;
  va_start(valist, FmtStr);
  const int RetVal=vsnprintf(Bf, 10*1024-2, FmtStr, valist);
  va_end(valist);
  return RetVal!=-1 ? TStr(Bf) : TStr::GetNullStr();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 798 of file dt.cpp.

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

                   {
  int StrLen=Len(); IAssert(StrLen%2==0);
  TChA ChA; int ChN=0;
  while (ChN<StrLen){
    char MshCh=RStr->Bf[ChN]; ChN++;
    char LshCh=RStr->Bf[ChN]; ChN++;
    uchar Ch=uchar(TCh::GetHex(MshCh)*16+TCh::GetHex(LshCh));
    ChA+=Ch;
  }
  *this=ChA;
  return *this;
}

Here is the call graph for this function:

TStr TStr::GetCap ( ) const [inline]

Definition at line 502 of file dt.h.

References TStr().

{return TStr(*this).ToCap();}

Here is the call graph for this function:

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

Definition at line 483 of file dt.h.

References TRStr::GetCh(), and RStr.

Referenced by TLxChDef::GetUcStr(), TUrlLxChDef::InclStr(), TLxChDef::IsNmStr(), IsWcMatch(), and LastCh().

{return RStr->GetCh(ChN);}

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().

                                  {
  static char MnCh=char(CHAR_MIN);
  static char MxCh=char(CHAR_MAX);
  static int Chs=int(MxCh)-int(MnCh)+1;
  static TStrV ChStrV;
  if (ChStrV.Empty()){
    ChStrV.Gen(Chs);
    for (int ChN=0; ChN<Chs; ChN++){
      ChStrV[ChN]=TStr(char(MnCh+ChN), true);}
  }
  return ChStrV[int(Ch-MnCh)];
}

Here is the call graph for this function:

Here is the caller graph for this function:

char* TStr::GetCStr ( ) const [inline]

Definition at line 686 of file dt.h.

References CStr(), and Len().

Referenced by TMAGFitBern::SaveTxt().

                        {
    char* Bf=new char[Len()+1]; strcpy(Bf, CStr()); return Bf;}

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 >::At(), TVVec< TVal >::Empty(), Fail, TVVec< TVal >::Gen(), TCh::Mn, TStr(), and TCh::Vals.

                                                     {
  Fail; // temporary
  static TStrVV DChStrVV;
  if (DChStrVV.Empty()){
    DChStrVV.Gen(TCh::Vals, TCh::Vals);
    for (int Ch1N=0; Ch1N<TCh::Vals; Ch1N++){
      for (int Ch2N=0; Ch2N<TCh::Vals; Ch2N++){
        DChStrVV.At(Ch1N, Ch2N)=
         TStr(char(TCh::Mn+Ch1N), char(TCh::Mn+Ch2N), true);
      }
    }
  }
  return DChStrVV.At(int(Ch1-TCh::Mn), int(Ch2-TCh::Mn));
}

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().

                          {
  int ThisLen=Len(); const char* ThisBf=CStr();
  int ChN=ThisLen-1;
  while ((ChN>=0)&&(ThisBf[ChN]!='/')&&(ThisBf[ChN]!='\\')){ChN--;}
  return GetSubStr(ChN+1, ThisLen);
}

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().

                         {
  int ThisLen=Len(); const char* ThisBf=CStr();
  int ChN=ThisLen-1;
  while ((ChN>=0)&&(ThisBf[ChN]!='/')&&(ThisBf[ChN]!='\\')&&
   (ThisBf[ChN]!='.')){ChN--;}
  if ((ChN>=0)&&(ThisBf[ChN]=='.')){return GetSubStr(ChN, Len());}
  else {return TStr();}
}

Here is the call graph for this function:

Here is the caller graph for this function:

double TStr::GetFlt ( ) const [inline]

Definition at line 629 of file dt.h.

References IAssert, and IsFlt().

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

                        {
    double Val; IAssert(IsFlt(false, 0, 0, Val)); return Val;}

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 631 of file dt.h.

References IsFlt().

                                           {
    double Val; if (IsFlt(false, 0, 0, Val)){return Val;} else {return DfVal;}}

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().

                         {
  int ThisLen=Len(); const char* ThisBf=CStr();
  int ChN=ThisLen-1;
  while ((ChN>=0)&&(ThisBf[ChN]!='/')&&(ThisBf[ChN]!='\\')&&(ThisBf[ChN]!='.')){
    ChN--;}
  if (ChN<0){
    return *this;
  } else {
    if (ThisBf[ChN]=='.'){
      int EChN= --ChN;
      while ((ChN>=0)&&(ThisBf[ChN]!='/')&&(ThisBf[ChN]!='\\')){ChN--;}
      return GetSubStr(ChN+1, EChN);
    } else {
      return GetSubStr(ChN+1, ThisLen);
    }
  }
}

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().

                                                           {
  TChA FNm=Str;
  for (int ChN=0; ChN<FNm.Len(); ChN++){
    uchar Ch=FNm[ChN];
    if (AlNumOnlyP){
      if (
       (('0'<=Ch)&&(Ch<='9'))||
       (('A'<=Ch)&&(Ch<='Z'))||
       (('a'<=Ch)&&(Ch<='z'))||
       (Ch=='-')||(Ch=='_')){}
      else {Ch='_';}
    } else {
      if ((Ch<=' ')||(Ch=='/')||(Ch=='\\')||(Ch==':')||(Ch=='.')){
        Ch='_';}
    }
    FNm.PutCh(ChN, Ch);
  }
  return FNm;
}

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(), and TFFile::TFFile().

                          {
  int ThisLen=Len(); const char* ThisBf=CStr();
  int ChN=ThisLen-1;
  while ((ChN>=0)&&(ThisBf[ChN]!='/')&&(ThisBf[ChN]!='\\')){ChN--;}
  return GetSubStr(0, ChN);
}

Here is the call graph for this function:

Here is the caller graph for this function:

TStr TStr::GetFromHex ( ) const [inline]

Definition at line 514 of file dt.h.

References TStr().

{return TStr(*this).FromHex();}

Here is the call graph for this function:

TStr TStr::GetHex ( ) const [inline]

Definition at line 512 of file dt.h.

References TStr().

Referenced by TXmlLx::GetSymStr(), IsHexInt(), and IsHexInt64().

{return TStr(*this).ToHex();}

Here is the call graph for this function:

Here is the caller graph for this function:

int TStr::GetHexInt ( ) const [inline]

Definition at line 612 of file dt.h.

References IAssert, and IsHexInt().

                        {
    int Val; IAssert(IsHexInt(false, 0, 0, Val)); return Val;}

Here is the call graph for this function:

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

Definition at line 614 of file dt.h.

References IsHexInt().

                                        {
    int Val; if (IsHexInt(false, 0, 0, Val)){return Val;} else {return DfVal;}}

Here is the call graph for this function:

int64 TStr::GetHexInt64 ( ) const [inline]

Definition at line 620 of file dt.h.

References IAssert, and IsHexInt64().

                            {
    int64 Val; IAssert(IsHexInt64(false, 0, 0, Val)); return Val;}

Here is the call graph for this function:

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

Definition at line 622 of file dt.h.

References IsHexInt64().

                                              {
    int64 Val; if (IsHexInt64(false, 0, 0, Val)){return Val;} else {return DfVal;}}

Here is the call graph for this function:

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

Definition at line 580 of file dt.h.

References IsInt().

                                     {
    int Val; if (IsInt(false, 0, 0, Val)){return Val;} else {return DfVal;}}

Here is the call graph for this function:

int64 TStr::GetInt64 ( ) const [inline]

Definition at line 595 of file dt.h.

References IAssert, and IsInt64().

                         {
    int64 Val; IAssert(IsInt64(false, 0, 0, Val)); return Val;}

Here is the call graph for this function:

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

Definition at line 597 of file dt.h.

References IsInt64().

                                           {
    int64 Val; if (IsInt64(false, 0, 0, Val)){return Val;} else {return DfVal;}}

Here is the call graph for this function:

TStr TStr::GetLc ( ) const [inline]

Definition at line 499 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(), and TUnicode::NormalizeCodecName().

{return TStr(*this).ToLc();}

Here is the call graph for this function:

Here is the caller graph for this function:

int TStr::GetMemUsed ( ) const [inline]

Definition at line 472 of file dt.h.

References TRStr::GetMemUsed(), and RStr.

{return int(sizeof(TRStr*)+RStr->GetMemUsed());}

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().

                                                                {
  TStr NrBaseFPath;
  if (BaseFPath.Empty()){
    NrBaseFPath=GetNrFPath(TDir::GetCurDir());
  } else {
    NrBaseFPath=GetNrFPath(BaseFPath);
  }
  IAssert(IsAbsFPath(NrBaseFPath));
  TStr NrFPath=GetNrFPath(FPath);
  TStr NrAbsFPath;
  if (IsAbsFPath(NrFPath)){
    NrAbsFPath=NrFPath;
  } else {
    NrAbsFPath=GetNrFPath(NrBaseFPath+NrFPath);
  }
  NrAbsFPath.ChangeStrAll("/./", "/");
  NrAbsFPath.ChangeStrAll("\\.\\", "\\");
  return NrAbsFPath;
}

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().

                                    {
  if (FExt.Empty()||(FExt[0]=='.')){return FExt;}
  else {return TStr(".")+FExt;}
}

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().

                                    {
  TChA NrFMid;
  int FMidLen=FMid.Len();
  for (int ChN=0; ChN<FMidLen; ChN++){
    char Ch=FMid[ChN];
    if (TCh::IsAlNum(Ch)){NrFMid+=Ch;} else {NrFMid+='_';}
  }
  return NrFMid;
}

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().

                                  {
  return GetNrFPath(FNm.GetFPath())+FNm.GetFMid()+GetNrFExt(FNm.GetFExt());
}

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().

                                      {
  TChA NrFPath(FPath.Len()+4); NrFPath+=FPath;
  NrFPath.ChangeCh('\\', '/');
  if (NrFPath.Empty()){NrFPath="./";}
  if ((NrFPath.Len()>=2)&&isalpha(NrFPath[0])&&(NrFPath[1]==':')){
    if (NrFPath.Len()==2){NrFPath+="./";}
    if ((NrFPath[2]!='.')&&(NrFPath[2]!='/')){NrFPath.Ins(2, "./");}
    if (NrFPath[NrFPath.Len()-1]!='/'){NrFPath+="/";}
  } else {
    if ((NrFPath[0]!='.')&&(NrFPath[0]!='/')){NrFPath.Ins(0, "./");}
    if (NrFPath[NrFPath.Len()-1]!='/'){NrFPath+="/";}
  }
  return NrFPath;
}

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 GetStr(), Len(), and TStr().

Referenced by TMBlobBs::GetSegFNm().

                                       {
  TStr FExtNStr=TInt::GetStr(FExtN);
  while (FExtNStr.Len()<3){
    FExtNStr=TStr("0")+FExtNStr;}
  return FExtNStr;
}

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 GetStr().

                                                   {
  return FNm.GetFPath()+FNm.GetFMid()+TInt::GetStr(Num, "%03d")+FNm.GetFExt();
}

Here is the call graph for this function:

int TStr::GetPrimHashCd ( ) const [inline]

Definition at line 570 of file dt.h.

References TRStr::GetPrimHashCd(), and RStr.

Referenced by TDbStr::GetPrimHashCd().

{return RStr->GetPrimHashCd();}

Here is the call graph for this function:

Here is the caller graph for this function:

TRStr * TStr::GetRStr ( const char *  CStr) [static, private]

Definition at line 719 of file dt.cpp.

References TRStr::GetNullRStr().

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

                                    {
  int CStrLen;
  if (CStr==NULL){CStrLen=0;} else {CStrLen=int(strlen(CStr));}
  if (CStrLen==0){return TRStr::GetNullRStr();}
  // next lines are not multi-threading safe
  //else if (CStrLen==1){return GetChStr(CStr[0]).RStr;}
  //else if (CStrLen==2){return GetDChStr(CStr[0], CStr[1]).RStr;}
  else {return new TRStr(CStr);}
}

Here is the call graph for this function:

Here is the caller graph for this function:

int TStr::GetSecHashCd ( ) const [inline]

Definition at line 571 of file dt.h.

References TRStr::GetSecHashCd(), and RStr.

Referenced by TDbStr::GetSecHashCd().

{return RStr->GetSecHashCd();}

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().

                                       {
  static TStrV SpaceStrV;
  if (SpaceStrV.Len()==0){
    for (int SpaceStrN=0; SpaceStrN<10; SpaceStrN++){
      TChA SpaceChA;
      for (int ChN=0; ChN<SpaceStrN; ChN++){SpaceChA+=' ';}
      SpaceStrV.Add(SpaceChA);
    }
  }
  if ((0<=Spaces)&&(Spaces<SpaceStrV.Len())){
    return SpaceStrV[Spaces];
  } else {
    TChA SpaceChA;
    for (int ChN=0; ChN<Spaces; ChN++){SpaceChA+=' ';}
    return SpaceChA;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

TStr TStr::GetStr ( ) const [inline]

Definition at line 679 of file dt.h.

Referenced by GetNrNumFExt(), GetNumFNm(), TJsonVal::GetObjStr(), GetStr(), THtmlDoc::GetTok(), TXmlDoc::LoadTxtElement(), and TSOut::PutStr().

{return *this;}

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().

                                                    {
  if (FmtStr==NULL){
    return Str;
  } else {
    char Bf[1000];
    sprintf(Bf, FmtStr, Str.CStr());
    return TStr(Bf);
  }
}

Here is the call graph for this function:

static TStr TStr::GetStr ( const TStr Str,
const TStr FmtStr 
) [inline, static]

Definition at line 681 of file dt.h.

References CStr(), and GetStr().

                                                         {
    return GetStr(Str, FmtStr.CStr());}

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().

                                                            {
  if (StrV.Empty()){return TStr();}
  TChA ResStr=StrV[0];
  for (int StrN=1; StrN<StrV.Len(); StrN++){
    ResStr+=DelimiterStr;
    ResStr+=StrV[StrN];
  }
  return ResStr;
}

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 TSnap::DrawGViz(), TUrl::GetAbsFromBase(), TEnv::GetArgPostfix(), TEnv::GetExeFNm(), GetFBase(), GetFExt(), GetFMid(), GetFPath(), THtmlTok::GetFullStr(), TEnv::GetIfArgPrefixStr(), TEnv::GetIfArgPrefixStrV(), TTypeNm< Type >::GetNrTypeNm(), THtmlDoc::GetTxtLnDoc(), TAGMUtil::GVizComGraph(), InsStr(), THtmlTok::IsUrlTok(), Left(), LeftOf(), LeftOfLast(), TTimeNet::LoadAmazon(), TUniChDb::LoadTxt_ProcessDecomposition(), Mid(), TUniChDb::TUcdFileReader::ParseCodePointRange(), Right(), RightOf(), RightOfLast(), THtmlDoc::SaveHtmlToXml(), TMAGParam< TNodeAttr >::SaveTxt(), Slice(), SplitOnCh(), SplitOnLastCh(), SplitOnStr(), TMacro::SplitVarNm(), TNcpGraphsBase::TNcpGraphsBase(), and ToTrunc().

                                                             {
  int StrLen=Len();
  int BChN=TInt::GetMx(_BChN, 0);
  int EChN=TInt::GetMn(_EChN, StrLen-1);
  int Chs=EChN-BChN+1;
  if (Chs<=0){return TStr();}
  else if (Chs==StrLen){return *this;}
  else {
    char* Bf=new char[Chs+1]; strncpy(Bf, CStr()+BChN, Chs); Bf[Chs]=0;
    TStr Str(Bf); delete[] Bf;
    return Str;
  }
}

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 517 of file dt.h.

References GetSubStr(), and Len().

Referenced by GetSubStr().

{ return GetSubStr(BChN, Len()-1); }

Here is the call graph for this function:

Here is the caller graph for this function:

TStr TStr::GetTrunc ( ) const [inline]

Definition at line 506 of file dt.h.

References TStr().

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

{return TStr(*this).ToTrunc();}

Here is the call graph for this function:

Here is the caller graph for this function:

uint TStr::GetUInt ( ) const [inline]

Definition at line 587 of file dt.h.

References IAssert, and IsUInt().

{uint Val; IAssert(IsUInt(false, 0, 0, Val)); return Val;}

Here is the call graph for this function:

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

Definition at line 588 of file dt.h.

References IsUInt().

                                        {
    uint Val; if (IsUInt(false, 0, 0, Val)){return Val;} else {return DfVal;}}

Here is the call graph for this function:

uint64 TStr::GetUInt64 ( ) const [inline]

Definition at line 604 of file dt.h.

References IAssert, and IsUInt64().

                           {
    uint64 Val; IAssert(IsUInt64(false, 0, 0, Val)); return Val;}

Here is the call graph for this function:

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

Definition at line 606 of file dt.h.

References IsUInt64().

                                              {
    uint64 Val; if (IsUInt64(false, 0, 0, Val)){return Val;} else {return DfVal;}}

Here is the call graph for this function:

TStr TStr::GetUsFromYuAscii ( ) const [inline]

Definition at line 509 of file dt.h.

References TStr().

{return TStr(*this).ConvUsFromYuAscii();}

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().

                                                                  {
  TStrV StarStrV;
  if (IsWcMatch(WcStr, StarStrV)&&(StarStrV.Len()>=StarStrN)){
    IAssert(StarStrN>=0);
    return StarStrV[StarStrV.Len()-StarStrN-1];
  } else {
    return "";
  }
}

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(), and TFile::GetUniqueFNm().

                                                 {
  int ThisLen=Len();
  IAssert((0<=BChN)&&(BChN<=ThisLen));
  TStr NewStr;
  if (BChN==0){
    NewStr=Str+*this;
  } else
  if (BChN==ThisLen){
    NewStr=*this+Str;
  } else {
    NewStr=GetSubStr(0, BChN-1)+Str+GetSubStr(BChN, ThisLen-1);
  }
  *this=NewStr;
}

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().

                                      {
  if ((FPath.Len()>=3)&&isalpha(FPath[0])&&(FPath[1]==':')&&
   ((FPath[2]=='/')||(FPath[2]=='\\'))){
    return true;
  }
  return false;
}

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().

                                 {
  if (operator==("T")){Val=true; return true;}
  else if (operator==("F")){Val=false; return true;}
  else {return false;}
}

Here is the caller graph for this function:

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

Definition at line 554 of file dt.h.

References SearchCh().

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

{return SearchCh(Ch)!=-1;}

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().

                                            {
  // parsing format {ws} [+/-] +{d} ([.]{d}) ([E|e] [+/-] +{d})
  TChRet Ch(TStrIn::New(*this));
  while (TCh::IsWs(Ch.GetCh())){}
  if ((Ch()=='+')||(Ch()=='-')){Ch.GetCh();}
  if (!TCh::IsNum(Ch())&&Ch()!=DecDelimCh){return false;}
  while (TCh::IsNum(Ch.GetCh())){}
  if (Ch()==DecDelimCh){
    Ch.GetCh();
    while (TCh::IsNum(Ch.GetCh())){}
  }
  if ((Ch()=='e')||(Ch()=='E')){
    Ch.GetCh();
    if ((Ch()=='+')||(Ch()=='-')){Ch.GetCh();}
    if (!TCh::IsNum(Ch())){return false;}
    while (TCh::IsNum(Ch.GetCh())){}
  }
  if (!Ch.Eof()){return false;}
  double _Val=atof(CStr());
  if (Check&&((_Val<MnVal)||(_Val>MxVal))){
    return false;
  } else {
    Val=_Val; return true;
  }
}

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 627 of file dt.h.

References IsFlt().

Referenced by IsFlt().

{return IsFlt(false, 0, 0, Val);}

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsFlt ( ) const [inline]

Definition at line 628 of file dt.h.

References IsFlt().

Referenced by GetFlt(), and IsFlt().

{double Val; return IsFlt(false, 0, 0, Val);}

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(), GetHex(), TCh::GetHex(), TCh::IsHex(), TCh::IsWs(), and TStrIn::New().

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

                                                                                          {
  // parsing format {ws} [+/-][0x] +{XXX}
  int _Val=0;
  bool Minus=false;
  TChRet Ch(TStrIn::New(*this));
  while (TCh::IsWs(Ch.GetCh())){}
  if (Ch()=='+'){Minus=false; Ch.GetCh();}
  if (Ch()=='-'){Minus=true; Ch.GetCh();}
  if (Ch()=='0'){
    Ch.GetCh();
    if (tolower(Ch())=='x' ){
      Ch.GetCh(); if (Ch.Eof()){return false;}
    }
  }
  if (!Ch.Eof() && !TCh::IsHex(Ch())){return false;}
  if (!Ch.Eof()) _Val = TCh::GetHex(Ch());
  while (TCh::IsHex(Ch.GetCh())){_Val=16*_Val+TCh::GetHex(Ch());}
  if (Minus){_Val=-_Val;}
  if (Check&&((_Val<MnVal)||(_Val>MxVal))){return false;}
  if (Ch.Eof()){Val=_Val; return true;} else {return false;}
}

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 610 of file dt.h.

References IsHexInt().

Referenced by IsHexInt().

{return IsHexInt(false, 0, 0, Val);}

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsHexInt ( ) const [inline]

Definition at line 611 of file dt.h.

References IsHexInt().

Referenced by GetHexInt(), and IsHexInt().

{int Val; return IsHexInt(false, 0, 0, Val);}

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(), GetHex(), TCh::GetHex(), TCh::IsHex(), TCh::IsWs(), and TStrIn::New().

                                                                              {
  // parsing format {ws} [+/-][0x] +{XXX}
  int64 _Val=0;
  bool Minus=false;
  TChRet Ch(TStrIn::New(*this));
  while (TCh::IsWs(Ch.GetCh())){}
  if (Ch()=='+'){Minus=false; Ch.GetCh();}
  if (Ch()=='-'){Minus=true; Ch.GetCh();}
  if (Ch()=='0'){
    Ch.GetCh();
    if (tolower(Ch())=='x' ){
      Ch.GetCh(); if (Ch.Eof()){return false;}
    }
  }
  if (!Ch.Eof()) _Val=TCh::GetHex(Ch());
  while (TCh::IsHex(Ch.GetCh())){_Val=16*_Val+TCh::GetHex(Ch());}
  if (Minus){_Val=-_Val;}
  if (Check&&((_Val<MnVal)||(_Val>MxVal))){return false;}
  if (Ch.Eof()){Val=_Val; return true;} else {return false;}
}

Here is the call graph for this function:

bool TStr::IsHexInt64 ( int64 Val) const [inline]

Definition at line 618 of file dt.h.

References IsHexInt64().

Referenced by IsHexInt64().

{return IsHexInt64(false, 0, 0, Val);}

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsHexInt64 ( ) const [inline]

Definition at line 619 of file dt.h.

References IsHexInt64().

Referenced by GetHexInt64(), and IsHexInt64().

{int64 Val; return IsHexInt64(false, 0, 0, Val);}

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().

                                                                        {
  // parsing format {ws} [+/-] +{ddd}
  int _Val=0;
  bool Minus=false;
  TChRet Ch(TStrIn::New(*this));
  while (TCh::IsWs(Ch.GetCh())){}
  if (Ch()=='+'){Minus=false; Ch.GetCh();}
  if (Ch()=='-'){Minus=true; Ch.GetCh();}
  if (!TCh::IsNum(Ch())){return false;}
  _Val=TCh::GetNum(Ch());
  while (TCh::IsNum(Ch.GetCh())){_Val=10*_Val+TCh::GetNum(Ch());}
  if (Minus){_Val=-_Val;}
  if (Check&&((_Val<MnVal)||(_Val>MxVal))){return false;}
  if (Ch.Eof()){Val=_Val; return true;} else {return false;}
}

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 577 of file dt.h.

References IsInt().

Referenced by IsInt().

{return IsInt(false, 0, 0, Val);}

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsInt ( ) const [inline]

Definition at line 578 of file dt.h.

References IsInt().

Referenced by GetInt(), and IsInt().

{int Val; return IsInt(false, 0, 0, Val);}

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().

                                                                              {
  // parsing format {ws} [+/-] +{ddd}
  int64 _Val=0;
  bool Minus=false;
  TChRet Ch(TStrIn::New(*this));
  while (TCh::IsWs(Ch.GetCh())){}
  if (Ch()=='+'){Minus=false; Ch.GetCh();}
  if (Ch()=='-'){Minus=true; Ch.GetCh();}
  if (!TCh::IsNum(Ch())){return false;}
  _Val=TCh::GetNum(Ch());
  while (TCh::IsNum(Ch.GetCh())){_Val=10*_Val+TCh::GetNum(Ch());}
  if (Minus){_Val=-_Val;}
  if (Check&&((_Val<MnVal)||(_Val>MxVal))){return false;}
  if (Ch.Eof()){Val=_Val; return true;} else {return false;}
}

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 593 of file dt.h.

References IsInt64().

Referenced by IsInt64().

{return IsInt64(false, 0, 0, Val);}

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsInt64 ( ) const [inline]

Definition at line 594 of file dt.h.

References IsInt64().

Referenced by GetInt64(), and IsInt64().

{int64 Val; return IsInt64(false, 0, 0, Val);}

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsLc ( ) const [inline]

Definition at line 497 of file dt.h.

References TRStr::IsLc(), and RStr.

Referenced by TUrl::ToLcPath().

{return RStr->IsLc();}

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().

                                         {
        size_t len = strlen(Str);
        size_t thisLen = Len();
        if (len > thisLen) {
                return false;
        } else {
                size_t minLen = min(len, thisLen);
                int cmp = strncmp(Str, RStr->Bf, minLen);
                return cmp == 0;
        }
}

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 557 of file dt.h.

References CStr(), and IsPrefix().

                                       {
    return IsPrefix(Str.CStr());}

Here is the call graph for this function:

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

Definition at line 555 of file dt.h.

References SearchStr().

{return SearchStr(Str)!=-1;}

Here is the call 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(), and IsSuffix().

                                         {
        size_t len = strlen(Str);
        size_t thisLen = Len();
        if (len > thisLen) {
                // too long to be a suffix anyway
                return false;
        } else {
                // move to the point in the buffer where we would expect the suffix to be
                const char *ending = RStr->Bf + thisLen - len;
                int cmp = strncmp(Str, ending, len);
                return cmp == 0;
        }
}

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 560 of file dt.h.

References CStr(), and IsSuffix().

                                       {
    return IsSuffix(Str.CStr());}

Here is the call graph for this function:

bool TStr::IsUc ( ) const [inline]

Definition at line 491 of file dt.h.

References TRStr::IsUc(), and RStr.

{return RStr->IsUc();}

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().

                                                                           {
  // parsing format {ws} [+]{ddd}
  uint _Val=0;
  TChRet Ch(TStrIn::New(*this));
  while (TCh::IsWs(Ch.GetCh())){}
  if (Ch()=='+'){Ch.GetCh();}
  if (!TCh::IsNum(Ch())){return false;}
  _Val=TCh::GetNum(Ch());
  while (TCh::IsNum(Ch.GetCh())){_Val=10*_Val+TCh::GetNum(Ch());}
  if (Check&&((_Val<MnVal)||(_Val>MxVal))){return false;}
  if (Ch.Eof()){Val=_Val; return true;} else {return false;}
}

Here is the call graph for this function:

bool TStr::IsUInt ( uint Val) const [inline]

Definition at line 585 of file dt.h.

References IsUInt().

Referenced by IsUInt().

{return IsUInt(false, 0, 0, Val);}

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsUInt ( ) const [inline]

Definition at line 586 of file dt.h.

References IsUInt().

Referenced by GetUInt(), and IsUInt().

{uint Val; return IsUInt(false, 0, 0, Val);}

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().

                                                                                 {
  // parsing format {ws} [+]{ddd}
  uint64 _Val=0;
  TChRet Ch(TStrIn::New(*this));
  while (TCh::IsWs(Ch.GetCh())){}
  if (Ch()=='+'){Ch.GetCh();}
  if (!TCh::IsNum(Ch())){return false;}
  _Val=TCh::GetNum(Ch());
  while (TCh::IsNum(Ch.GetCh())){_Val=10*_Val+TCh::GetNum(Ch());}
  if (Check&&((_Val<MnVal)||(_Val>MxVal))){return false;}
  if (Ch.Eof()){Val=_Val; return true;} else {return false;}
}

Here is the call graph for this function:

bool TStr::IsUInt64 ( uint64 Val) const [inline]

Definition at line 602 of file dt.h.

References IsUInt64().

Referenced by IsUInt64().

{return IsUInt64(false, 0, 0, Val);}

Here is the call graph for this function:

Here is the caller graph for this function:

bool TStr::IsUInt64 ( ) const [inline]

Definition at line 603 of file dt.h.

References IsUInt64().

Referenced by GetUInt64(), and IsUInt64().

{uint64 Val; return IsUInt64(false, 0, 0, Val);}

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().

                                                {
  int StrLen=Len(); int WcStrLen=WcStr.Len();
  int StrChN=StrBChN; int WcStrChN=WcStrBChN;
  while ((StrChN<StrLen)&&(WcStrChN<WcStrLen)){
    if ((WcStr[WcStrChN]==QuestCh)||(GetCh(StrChN)==WcStr[WcStrChN])){
      StrChN++; WcStrChN++;
    } else
    if (WcStr[WcStrChN]==StarCh){
      TChA StarChA; // string substituted by star character
      for (int AfterStrChN=StrChN; AfterStrChN<=StrLen; AfterStrChN++){
        if (AfterStrChN>StrChN){
          StarChA+=GetCh(AfterStrChN-1);}
        if (IsWcMatch(AfterStrChN, WcStr, WcStrChN+1, StarStrV, StarCh, QuestCh)){
          StarStrV.Add(StarChA); return true;
        }
      }
      return false;
    } else {
      return false;
    }
  }
  if (StrChN==StrLen){
    for (int AfterWcStrChN=WcStrChN; AfterWcStrChN<WcStrLen; AfterWcStrChN++){
      if (WcStr[AfterWcStrChN]!=StarCh){return false;}}
    return true;
  } else {
    return false;
  }
}

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().

                                                                                    {
  bool WcMatch=IsWcMatch(0, WcStr, 0, StarStrV, StarCh, QuestCh);
  if (WcMatch){
    StarStrV.Reverse();
    return true;
  } else {
    return false;
  }
}

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().

                                                                   {
  TStrV StarStrV;
  return IsWcMatch(0, WcStr, 0, StarStrV, StarCh, QuestCh);
}

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().

                                                                                {
  TStrV StarStrV;
  if (IsWcMatch(WcStr, StarStrV)){
    if (StarStrV.Len()>StarStrN){
      StarStr=StarStrV[StarStrV.Len()-StarStrN-1];
    } else {
      StarStr="";
    }
    return true;
  } else {
    return false;
  }
}

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().

                                            {
  TStrV StarStrV;
  return IsWcMatch(0, WcStr, 0, StarStrV);
}

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().

                                                                          {
  // parsing format {ws} (A-Z,a-z) *{A-Z,a-z,0-9}
  TChRet Ch(TStrIn::New(*this));
  if (WsPrefixP){while (TCh::IsWs(Ch.GetCh())){}}
  else {Ch.GetCh();}
  if (!TCh::IsAlpha(Ch())){return false;}
  else if (!FirstUcAllowedP&&(TCh::IsUc(Ch()))){return false;}
  while (TCh::IsAlNum(Ch.GetCh())){}
  if (!Ch.Eof()){return false;}
  return true;
}

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().

                      {
  // if string is just a bunch of whitespace chars
  TChRet Ch(TStrIn::New(*this));
  while (TCh::IsWs(Ch.GetCh())){}
  return Ch.Eof();
}

Here is the call graph for this function:

char TStr::LastCh ( ) const [inline]

Definition at line 484 of file dt.h.

References GetCh(), and Len().

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

{return GetCh(Len()-1);}

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 545 of file dt.h.

References GetSubStr(), and Len().

{ return EChN>0 ? GetSubStr(0, EChN-1) : GetSubStr(0, Len()+EChN-1);}

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().

                                           {
  int ThisLen=Len(); const char* ThisBf=CStr();
  int ChN=0;
  while ((ChN<ThisLen)&&(ThisBf[ChN]!=SplitCh)){ChN++;}
  return (ChN==ThisLen) ? "" : GetSubStr(0, ChN-1);
}

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().

                                               {
  const char* ThisBf=CStr();
  int ChN=Len()-1;
  while ((ChN>=0)&&(ThisBf[ChN]!=SplitCh)){ChN--;}
  return (ChN==-1) ? "" : GetSubStr(0, ChN-1);
}

Here is the call graph for this function:

int TStr::Len ( ) const [inline]

Definition at line 487 of file dt.h.

References TRStr::Len(), and RStr.

Referenced by TJsonVal::AddEscapeChAFromStr(), TBigStrPool::AddStr(), TStrPool::AddStr(), TStrPool64::AddStr(), TTmProfiler::AddTimer(), TBlobBs::AssertVersionStr(), ChangeChAll(), ChangeStr(), ChangeStrAll(), anonymous_namespace{unicode.cpp}::CombinePath(), CountCh(), DelStr(), DelSubStr(), TMem::DoFitStr(), TSnap::DrawGViz(), TAGMUtil::FindComsByAGM(), FromHex(), TUrl::GetAbsFromBase(), TEnv::GetArgPostfix(), TBlobBs::GetBlobBsStateStr(), TBlobBs::GetBlockLenV(), GetCStr(), TUrl::GetDmNm(), TUrl::GetDocStrFromUrlStr(), TMacro::GetDstSubstStr(), TMacro::GetDstTxtStr(), 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(), 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(), TMem::operator+=(), TChA::operator+=(), TCon::operator<<(), TChA::operator=(), TUniChDb::TUcdFileReader::ParseCodePointRange(), TEnv::PrepArgs(), TTmProfiler::PrintReport(), TXmlLx::PutStr(), THtmlLx::PutStr(), TSOut::PutStr(), TFRnd::PutStr(), 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(), TMacro::SplitVarNm(), TChA::TChA(), TUniCodec::TestDecodeUtf16(), TUniCodec::TestDecodeUtf8(), TMacro::TMacro(), TMIn::TMIn(), ToHex(), ToTrunc(), TCodecBase::ToUnicode(), and T8BitCodec< TEncoding_ISO8859_3 >::ToUnicode().

{return RStr->Len();}

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().

                                                 {
    *this=TStr(SIn, IsSmall);}

Here is the call graph for this function:

static TStr TStr::LoadTxt ( const PSIn SIn) [inline, static]

Definition at line 667 of file dt.h.

References TStr().

Referenced by TExpVal::GetStr(), and LoadTxt().

                                      {
    return TStr(SIn);}

Here is the call graph for this function:

Here is the caller graph for this function:

static TStr TStr::LoadTxt ( const TStr FNm) [inline, static]

Definition at line 669 of file dt.h.

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

                                      {
    PSIn SIn=TFIn::New(FNm); return LoadTxt(SIn);}

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.

                                                       {
  XLoadHd(Nm);
  TStr TokStr=XmlTok->GetTokStr(false);
  operator=(TokStr);
}

Here is the call graph for this function:

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

Definition at line 539 of file dt.h.

References GetSubStr().

{ return GetSubStr(BChN, BChN+Chs-1); }

Here is the call graph for this function:

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

Definition at line 540 of file dt.h.

References GetSubStr(), and Len().

{return GetSubStr(BChN, Len()-1); }

Here is the call graph for this function:

static TStr TStr::MkClone ( const TStr Str) [inline, static]

Definition at line 689 of file dt.h.

References CStr(), and TStr().

{return TStr(Str.CStr());}

Here is the call graph for this function:

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

Definition at line 467 of file dt.h.

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

                                          {
    return strcmp(RStr->CStr(), CStr)!=0;}

Here is the call graph for this function:

char* TStr::operator() ( ) [inline]

Definition at line 474 of file dt.h.

References TRStr::CStr(), and RStr.

{return RStr->CStr();}

Here is the call graph for this function:

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

Definition at line 475 of file dt.h.

References TRStr::CStr(), and RStr.

{return RStr->CStr();}

Here is the call graph for this function:

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

Definition at line 548 of file dt.h.

References Slice().

{return Slice(BChN, EChNP1);}

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().

                                   {
    TRStr* NewRStr=new TRStr(RStr->CStr(), Str.RStr->CStr());
    RStr->UnRef(); RStr=NewRStr; RStr->MkRef();
    Optimize(); return *this;}

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(), RStr, and TRStr::UnRef().

                                    {
    TRStr* NewRStr=new TRStr(RStr->CStr(), CStr);
    RStr->UnRef(); RStr=NewRStr; RStr->MkRef();
    Optimize(); return *this;}

Here is the call graph for this function:

bool TStr::operator< ( const TStr Str) const [inline]

Definition at line 469 of file dt.h.

References TRStr::CStr(), and RStr.

                                        {
    return strcmp(RStr->CStr(), Str.RStr->CStr())<0;}

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().

                                  {
    if (this!=&Str){RStr->UnRef(); RStr=Str.RStr; RStr->MkRef();} return *this;}

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(), RStr, and TRStr::UnRef().

                                  {
    RStr->UnRef(); RStr=GetRStr(ChA.CStr()); RStr->MkRef(); return *this;}

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(), RStr, and TRStr::UnRef().

                                   {
    RStr->UnRef(); RStr=GetRStr(CStr); RStr->MkRef(); return *this;}

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().

                                 {
    RStr->UnRef(); RStr=GetChStr(Ch).RStr; RStr->MkRef(); return *this;}

Here is the call graph for this function:

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

Definition at line 461 of file dt.h.

References TRStr::CStr(), and RStr.

                                         {
    return (RStr==Str.RStr)||(strcmp(RStr->CStr(), Str.RStr->CStr())==0);}

Here is the call graph for this function:

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

Definition at line 463 of file dt.h.

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

                                          {
    return strcmp(RStr->CStr(), CStr)==0;}

Here is the call graph for this function:

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

Definition at line 471 of file dt.h.

References TRStr::GetCh(), and RStr.

{return RStr->GetCh(ChN);}

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().

                   {
  char* CStr=RStr->CStr(); int CStrLen=int(strlen(CStr));
  TRStr* NewRStr;
  if (CStrLen==0){NewRStr=TRStr::GetNullRStr();}
  // next lines are not multi-threading safe
  //else if (CStrLen==1){NewRStr=GetChStr(CStr[0]).RStr;}
  //else if (CStrLen==2){NewRStr=GetDChStr(CStr[0], CStr[1]).RStr;}
  else {NewRStr=RStr;}
  NewRStr->MkRef(); RStr->UnRef(); RStr=NewRStr;
}

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 479 of file dt.h.

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

Referenced by ChangeCh().

                                            {
    TRStr* NewRStr=new TRStr(RStr->CStr());
    RStr->UnRef(); RStr=NewRStr; RStr->MkRef();
    RStr->PutCh(ChN, Ch); Optimize();}

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().

                                                     {
  return FNm.GetFPath()+FBase;
}

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().

                                                            {
  if (FNm.GetFBase().Empty()){
    return FNm.GetFPath()+FBase;
  } else {
    return FNm;
  }
}

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().

                                                   {
  return FNm.GetFPath()+FNm.GetFMid()+FExt;
}

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().

                                                          {
  if (FNm.GetFExt().Empty()){
    return FNm.GetFPath()+FNm.GetFMid()+FExt;
  } else {
    return FNm;
  }
}

Here is the call graph for this function:

TStr TStr::Reverse ( ) const [inline]

Definition at line 567 of file dt.h.

References TChA::Reverse().

                       {
    TChA ChA(*this); ChA.Reverse(); return ChA;}

Here is the call graph for this function:

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

Definition at line 546 of file dt.h.

References GetSubStr(), and Len().

{return BChN>=0 ? GetSubStr(BChN, Len()-1) : GetSubStr(Len()+BChN, Len()-1);}

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().

                                            {
  int ThisLen=Len(); const char* ThisBf=CStr();
  int ChN=0;
  while ((ChN<ThisLen)&&(ThisBf[ChN]!=SplitCh)){ChN++;}
  return (ChN==ThisLen) ? "" : GetSubStr(ChN+1, ThisLen-1);
}

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().

                                                {
  int ThisLen=Len(); const char* ThisBf=CStr();
  int ChN=Len()-1;
  while ((ChN>=0)&&(ThisBf[ChN]!=SplitCh)){ChN--;}
  return (ChN==-1) ? "" : GetSubStr(ChN+1, ThisLen-1);
}

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 RStr, and TRStr::Save().

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

                                                          {
    RStr->Save(SOut, IsSmall);}

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 671 of file dt.h.

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

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

                                        {
    SOut->SaveBf(CStr(), Len());}

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 673 of file dt.h.

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

                                      {
    PSOut SOut=TFOut::New(FNm); SaveTxt(SOut);}

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.

                                                    {
  TStr XmlStr=TXmlLx::GetXmlStrFromPlainStr(*this);
  if (XmlStr.Empty()){XSaveBETag(Nm);}
  else {XSaveHd(Nm); SOut.PutStr(XmlStr);}
}

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(), TMacro::SplitVarNm(), and TNcpGraphsBase::TNcpGraphsBase().

                                                        {
  int ThisLen=Len(); const char* ThisBf=CStr();
  int ChN=TInt::GetMx(BChN, 0);
  while (ChN<ThisLen){
    if (ThisBf[ChN]==Ch){return ChN;}
    ChN++;
  }
  return -1;
}

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().

                                                     {
  const int StrLen=Len();
  if (BChN==-1||BChN>=StrLen){BChN=StrLen-1;}
  const char* ThisBf=CStr();
  const char* Pt=ThisBf + BChN;
  while (Pt>=ThisBf) {
    if (*Pt==Ch){return (int)(Pt-ThisBf);}
    Pt--;
  }
  return -1;
}

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(), IsStrIn(), TUniChDb::TUcdFileReader::ParseCodePointRange(), SplitOnStr(), and TNcpGraphsBase::TNcpGraphsBase().

                                                          {
  int NrBChN=TInt::GetMx(BChN, 0);
  const char* StrPt=strstr((const char*)CStr()+NrBChN, Str.CStr());
  if (StrPt==NULL){return -1;}
  else {return int(StrPt-CStr());}
/*  // slow implementation
  int ThisLen=Len(); int StrLen=Str.Len();
  int ChN=TInt::GetMx(BChN, 0);
  while (ChN<ThisLen-StrLen+1){
    if (strncmp(CStr()+ChN, Str.CStr(), StrLen)==0){
      return ChN;}
    ChN++;
  }
  return -1;*/
}

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 547 of file dt.h.

References GetSubStr(), and Len().

Referenced by operator()().

{ if(BChN<0){BChN=Len()+BChN;} if(EChNP1<=0){EChNP1=Len()+EChNP1;} return GetSubStr(BChN, EChNP1-1); }

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().

                                                                   {
  // reset string output-vector
  StrV.Clr();
  // prepare working-copy of string
  char* Bf=new char[Len()+1];
  strcpy(Bf, CStr());
  char* CurStrBf=Bf; // pointer to current string
  // prepare pointer to split-char-string
  const char* SplitChBf=SplitChStr.CStr();
  forever{
    char* BfC=CurStrBf; // set the counter for working-string
    while (*BfC!=0){
      const char* SplitChBfC=SplitChBf; // set counter for split-char-string
      while ((*SplitChBfC!=0)&&(*SplitChBfC!=*BfC)){SplitChBfC++;}
      if (*SplitChBfC!=0){break;} // if split-char found
      BfC++;
    }
    bool IsEnd=(*BfC==0);
    *BfC=0;
    if ((BfC>CurStrBf)||(!SkipEmpty)){StrV.Add(TStr(CurStrBf));}
    if (IsEnd){break;}
    CurStrBf=BfC+1;
  }
  // delete working-copy
  delete[] Bf;
}

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().

                                                                {
  StrV.Clr();
  char* Bf=new char[Len()+1];
  strcpy(Bf, CStr());
  char* CurStrBf=Bf;
  forever{
    char* BfC=CurStrBf;
    while ((*BfC!=0)&&(*BfC!=SplitCh)){BfC++;}
    bool IsEnd=(*BfC=='\0');
    *BfC=0;
    if ((BfC>CurStrBf)||(!SkipEmpty)){StrV.Add(TStr(CurStrBf));}
    if (IsEnd){break;}
    CurStrBf=BfC+1;
  }
  delete[] Bf;
}

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 TPp::GetPp(), TXmlTok::GetTagTok(), TXmlDoc::GetTagTok(), TEnv::GetVarNmV(), and TTimeNet::LoadPatents().

                                                                      {
  int ThisLen=Len(); const char* ThisBf=CStr();
  int ChN=0;
  while ((ChN<ThisLen)&&(ThisBf[ChN]!=SplitCh)){ChN++;}
  if (ChN==ThisLen){
    LStr=GetSubStr(0, ThisLen-1); RStr="";
  } else {
    LStr=GetSubStr(0, ChN-1); RStr=GetSubStr(ChN+1, ThisLen-1);
  }
}

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().

                                                                          {
  int ThisLen=Len(); const char* ThisBf=CStr();
  int ChN=Len()-1;
  while ((ChN>=0)&&(ThisBf[ChN]!=SplitCh)){ChN--;}
  if (ChN==-1){
    LStr=""; RStr=*this;
  } else
  if (ChN==0){
    LStr=""; RStr=GetSubStr(1, ThisLen-1);
  } else {
    LStr=GetSubStr(0, ChN-1); RStr=GetSubStr(ChN+1, ThisLen-1);
  }
}

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().

                                            {
  StrV.Clr();
  char* Bf=new char[Len()+1];
  strcpy(Bf, CStr());
  char* StrBf=Bf;
  forever{
    while ((*StrBf!=0)&&(!TCh::IsAlNum(*StrBf))){StrBf++;}
    char* BfC=StrBf;
    while ((*BfC!=0)&&(TCh::IsAlNum(*BfC))){BfC++;}
    bool IsEnd=(*BfC=='\0');
    *BfC=0;
    if (BfC>StrBf){StrV.Add(TStr(StrBf));}
    if (IsEnd){break;}
    StrBf=BfC+1;
  }
  delete[] Bf;
}

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().

                                                             {
  StrV.Clr();
  int SplitStrLen=SplitStr.Len();
  int PrevChN=0; int ChN=0;
  while ((ChN=SearchStr(SplitStr, ChN))!=-1){
    // extract & add string
    TStr SubStr=GetSubStr(PrevChN, ChN-1);
    StrV.Add(SubStr);
    PrevChN=ChN=ChN+SplitStrLen;
  }
  // add last string
  TStr LastSubStr=GetSubStr(PrevChN, Len()-1);
  StrV.Add(LastSubStr);
}

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().

                                                                             {
  const int ChN=SearchStr(MidStr);
  if (ChN==-1){
    LeftStr=*this; RightStr=GetNullStr();
  } else {
    LeftStr=GetSubStr(0, ChN-1);
    RightStr=GetSubStr(ChN+MidStr.Len(), Len()-1);
  }
}

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().

                                      {
  StrV.Clr();
  char* Bf=new char[Len()+1];
  strcpy(Bf, CStr());
  char* StrBf=Bf;
  forever{
    while ((*StrBf!=0)&&(TCh::IsWs(*StrBf))){StrBf++;}
    char* BfC=StrBf;
    while ((*BfC!=0)&&(!TCh::IsWs(*BfC))){BfC++;}
    bool IsEnd=(*BfC=='\0');
    *BfC=0;
    if (BfC>StrBf){StrV.Add(TStr(StrBf));}
    if (IsEnd){break;}
    StrBf=BfC+1;
  }
  delete[] Bf;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 764 of file dt.cpp.

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

Referenced by TSecTm::GetDtTmFromDmyStr().

                 {
  TRStr* NewRStr=new TRStr(RStr->CStr()); NewRStr->ToCap();
  RStr->UnRef(); RStr=NewRStr; RStr->MkRef();
  Optimize(); return *this;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 785 of file dt.cpp.

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

                 {
  TChA ChA;
  int StrLen=Len();
  for (int ChN=0; ChN<StrLen; ChN++){
    uchar Ch=uchar(RStr->Bf[ChN]);
    char MshCh=TCh::GetHexCh((Ch/16)%16);
    char LshCh=TCh::GetHexCh(Ch%16);
    ChA+=MshCh; ChA+=LshCh;
  }
  *this=ChA;
  return *this;
}

Here is the call graph for this function:

Definition at line 758 of file dt.cpp.

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

Referenced by TUrl::ToLcPath().

                {
  TRStr* NewRStr=new TRStr(RStr->CStr()); NewRStr->ToLc();
  RStr->UnRef(); RStr=NewRStr; RStr->MkRef();
  Optimize(); return *this;
}

Here is the call graph for this function:

Here is the caller graph for this function:

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().

                   {
  int ThisLen=Len(); char* ThisBf=CStr();
  int BChN=0; int EChN=ThisLen-1;
  while ((BChN<ThisLen)&&TCh::IsWs(ThisBf[BChN])){BChN++;}
  while ((EChN>=0)&&TCh::IsWs(ThisBf[EChN])){EChN--;}
  *this=GetSubStr(BChN, EChN);
  return *this;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 752 of file dt.cpp.

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

Referenced by TFFile::TFFile().

                {
  TRStr* NewRStr=new TRStr(RStr->CStr()); NewRStr->ToUc();
  RStr->UnRef(); RStr=NewRStr; RStr->MkRef();
  Optimize(); return *this;
}

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.

                                                  {
  if (LStr.Empty()){return RStr;}
  else if (RStr.Empty()){return LStr;}
  else {return TStr(LStr)+=RStr;}
}
TStr operator+ ( const TStr LStr,
const char *  RCStr 
) [friend]

Definition at line 1637 of file dt.cpp.

                                                   {
  return TStr(LStr)+=RCStr;
}

Member Data Documentation


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