|
SNAP Library 4.0, Developer Reference
2017-07-27 13:18:06
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <dt.h>
Public Member Functions | |
| TChA (const int &_MxBfL=256) | |
| TChA (const char *CStr) | |
| TChA (const char *CStr, const int &StrLen) | |
| TChA (const TChA &ChA) | |
| TChA (const TStr &Str) | |
| TChA (const TMem &Mem) | |
| ~TChA () | |
| TChA (TSIn &SIn) | |
| void | Load (TSIn &SIn) |
| void | Save (TSOut &SOut, const bool &SaveCompact=true) const |
| void | LoadXml (const PXmlTok &XmlTok, const TStr &Nm) |
| void | SaveXml (TSOut &SOut, const TStr &Nm) const |
| TChA & | operator= (const TChA &ChA) |
| TChA & | operator= (const TStr &Str) |
| TChA & | operator= (const char *CStr) |
| bool | operator== (const TChA &ChA) const |
| bool | operator== (const char *_CStr) const |
| bool | operator== (const char &Ch) const |
| bool | operator!= (const TChA &ChA) const |
| bool | operator!= (const char *_CStr) const |
| bool | operator!= (const char &Ch) const |
| bool | operator< (const TChA &ChA) const |
| TChA & | operator+= (const TMem &Mem) |
| TChA & | operator+= (const TChA &ChA) |
| TChA & | operator+= (const TStr &Str) |
| TChA & | operator+= (const char *CStr) |
| TChA & | operator+= (const char &Ch) |
| char | operator[] (const int &ChN) const |
| char & | operator[] (const int &ChN) |
| int | GetMemUsed () const |
| char * | operator() () |
| const char * | operator() () const |
| char * | CStr () |
| const char * | CStr () const |
| void | Clr () |
| int | Len () const |
| bool | Empty () const |
| void | Ins (const int &BChN, const char *CStr) |
| void | Del (const int &ChN) |
| void | DelLastCh () |
| void | Push (const char &Ch) |
| char | Pop () |
| void | Trunc () |
| void | Trunc (const int &_BfL) |
| void | Reverse () |
| void | AddCh (const char &Ch, const int &MxLen=-1) |
| void | AddChTo (const char &Ch, const int &ToChN) |
| void | AddBf (char *NewBf, const int &BfS) |
| void | PutCh (const int &ChN, const char &Ch) |
| char | GetCh (const int &ChN) const |
| char | LastCh () const |
| char | LastLastCh () const |
| TChA | GetSubStr (const int &BChN, const int &EChN) 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 TChA &Str, const int &BChN=0) const |
| int | SearchStr (const TStr &Str, const int &BChN=0) const |
| int | SearchStr (const char *CStr, const int &BChN=0) const |
| bool | IsStrIn (const TStr &Str) const |
| bool | IsPrefix (const char *CStr, const int &BChN=0) const |
| bool | IsPrefix (const TStr &Str) const |
| bool | IsPrefix (const TChA &Str) const |
| bool | IsSuffix (const char *CStr) const |
| bool | IsSuffix (const TStr &Str) const |
| bool | IsSuffix (const TChA &Str) const |
| bool | IsChIn (const char &Ch) const |
| void | ChangeCh (const char &SrcCh, const char &DstCh) |
| TChA & | ToUc () |
| TChA & | ToLc () |
| TChA & | ToTrunc () |
| void | CompressWs () |
| void | Swap (const int &ChN1, const int &ChN2) |
| void | Swap (TChA &ChA) |
| int | GetPrimHashCd () const |
| int | GetSecHashCd () const |
| void | SaveTxt (const PSOut &SOut) const |
Static Public Member Functions | |
| static void | LoadTxt (const PSIn &SIn, TChA &ChA) |
Private Member Functions | |
| void | Resize (const int &_MxBfL) |
Private Attributes | |
| int | MxBfL |
| int | BfL |
| char * | Bf |
|
inlineexplicit |
|
inline |
|
inline |
| TChA::TChA | ( | const TStr & | Str | ) |
Definition at line 356 of file dt.cpp.
References Bf, BfL, TStr::CStr(), TStr::Len(), and MxBfL.

|
inline |
|
inline |
|
inlineexplicit |
|
inline |
Definition at line 275 of file dt.h.
References Bf, BfL, MxBfL, and Resize().
Referenced by TZipIn::GetNextLnBf(), and TFIn::GetNextLnBf().


|
inline |
Definition at line 271 of file dt.h.
References BfL, and operator+=().
Referenced by AddChTo(), TJsonVal::AddEscapeChAFromStr(), TUnicode::EncodeUtf8(), TStrUtil::GetCleanStr(), TStrUtil::GetCleanWrdStr(), THtmlLx::GetEscCh(), TSIn::GetNextLn(), TStrUtil::GetNormalizedUrl(), TILx::GetStrToCh(), TILx::GetStrToEoln(), TILx::GetStrToEolnAndCh(), TILx::GetStrToEolnOrCh(), THtmlLx::GetSym(), TILx::GetSym(), THtmlLx::GetTag(), TLxChDef::GetUcStr(), THttpRq::ParseSearch(), and TStrUtil::RemoveHtmlTags().


|
inline |
| void TChA::ChangeCh | ( | const char & | SrcCh, |
| const char & | DstCh | ||
| ) |
Definition at line 537 of file dt.cpp.
Referenced by TMem::GetAsStr().


|
inline |
Definition at line 258 of file dt.h.
Referenced by TSsParserMP::DumpStr(), TSsParser::DumpStr(), TXmlLx::GetAttList(), TXmlLx::GetCDSect(), TXmlLx::GetComment(), TSecTm::GetDtTmFromDmyStr(), TSecTm::GetDtTmFromHmsStr(), TSecTm::GetDtTmFromMdyHmsPmStr(), TSecTm::GetDtTmFromMdyStr(), TSecTm::GetDtTmFromYmdHmsStr(), TXmlLx::GetElement(), THtmlLx::GetEscCh(), TUrlLx::GetHost(), TUrlLx::GetHPath(), TILx::GetLnV(), TSIn::GetNextLn(), TZipIn::GetNextLnBf(), TFIn::GetNextLnBf(), TXmlLx::GetNotation(), TXmlLx::GetPI(), TXmlParser::GetPlainStrFromXmlStr(), TILx::GetStrToCh(), TILx::GetStrToEoln(), TILx::GetStrToEolnAndCh(), TILx::GetStrToEolnOrCh(), THtmlLx::GetSym(), TXmlLx::GetSym(), TILx::GetSym(), TXmlParser::GetSym(), THtmlLx::GetTag(), TTm::GetTmFromWebLogDateTimeStr(), TTm::GetTmFromWebLogTimeStr(), TXmlLx::GetWs(), TStrUtil::GetXmlTagNmVal2(), TSs::LoadTxt(), TSs::LoadTxtFldV(), TSsParserMP::Next(), TSsParser::Next(), TSsParser::NextSlow(), THttpRq::ParseSearch(), TUniChDb::TUcdFileReader::ReadNextLine(), TStrUtil::RemoveHtmlTags(), THtmlDoc::SaveHtmlToXml(), and Trunc().

| void TChA::CompressWs | ( | ) |
| int TChA::CountCh | ( | const char & | Ch, |
| const int & | BChN = 0 |
||
| ) | const |
Definition at line 462 of file dt.cpp.
References Bf, TInt::GetMx(), and Len().

|
inline |
Definition at line 255 of file dt.h.
References Bf.
Referenced by TStrHash< TInt, TBigStrPool >::AddDat(), TStrHash< TInt, TBigStrPool >::AddDatId(), TStrHash< TInt, TBigStrPool >::AddKey(), TStrUtil::CountWords(), TSsParserMP::DumpStr(), TSsParser::DumpStr(), TCodecWrapper< TCodecImpl_ >::FromUnicode(), TStrUtil::GetCleanStr(), TStrUtil::GetCleanWrdStr(), TStrHash< TInt, TBigStrPool >::GetDat(), TSecTm::GetDtTmFromStr(), GetNthOccurence(), TXmlParser::GetPlainStrFromXmlStr(), GetPrimHashCd(), GetSecHashCd(), GetSubStr(), TILx::GetSym(), TXmlParser::GetSym(), TXmlParser::GetTag(), TXmlParser::GetTagVal(), TStrUtil::GetXmlTagNmVal2(), TStrHash< TInt, TBigStrPool >::IsKey(), TStrHash< TInt, TBigStrPool >::IsKeyGetDat(), IsPrefix(), IsSuffix(), LoadTxt(), TSsParserMP::Next(), TSsParser::Next(), TSsParser::NextSlow(), operator!=(), TWChA::operator+=(), operator+=(), operator<(), TWChA::operator=(), operator=(), TStr::operator=(), operator==(), TSOut::PutStr(), TStrUtil::RemoveHtmlTags(), THtmlDoc::SaveHtmlToXml(), SaveTxt(), SearchStr(), TStrUtil::SplitLines(), TStrUtil::SplitOnCh(), TStrUtil::SplitSentences(), TStrUtil::SplitWords(), TChA(), TMd5Sig::TMd5Sig(), TMIn::TMIn(), TStr::TStr(), TWChA::TWChA(), and T8BitCodec< TEncoding_ISO8859_3 >::UniToStr().

|
inline |
| void TChA::Del | ( | const int & | ChN | ) |
|
inline |
Definition at line 263 of file dt.h.
References Pop().
Referenced by TSsParserMP::GetLnStr(), and TSsParser::GetLnStr().


|
inline |
Definition at line 260 of file dt.h.
References BfL.
Referenced by THtmlLx::GetCh(), TXmlLx::GetCh(), TUrl::GetDocStrFromUrlStr(), TILx::GetLnV(), TSIn::GetNextLn(), TZipIn::GetNextLnBf(), TFIn::GetNextLnBf(), TStrUtil::GetNormalizedUrl(), TWebPg::GetOutDescUrlStrKdV(), TXmlLx::GetPlainStrFromXmlStr(), TXmlParser::GetPlainStrFromXmlStr(), TXmlLx::GetReference(), THtmlLx::GetSym(), TXmlLx::GetSymStr(), THttpLx::GetToken(), THtmlDoc::GetTxtLnDoc(), THttpLx::GetUrl(), THttpLx::GetUrlStr(), TSs::LoadTxtFldV(), TSsParserMP::Next(), TSsParser::Next(), TSsParser::NextSlow(), THtmlLx::PutCh(), and THtmlDoc::SaveHtmlToXml().

|
inline |
Definition at line 280 of file dt.h.
References operator[]().
Referenced by CompressWs(), SearchChBack(), Swap(), ToTrunc(), and Trunc().


|
inline |
| int TChA::GetPrimHashCd | ( | ) | const |
Definition at line 607 of file dt.cpp.
References CStr(), and TStrHashF_DJB::GetPrimHashCd().

| int TChA::GetSecHashCd | ( | ) | const |
Definition at line 611 of file dt.cpp.
References CStr(), and TStrHashF_DJB::GetSecHashCd().

| TChA TChA::GetSubStr | ( | const int & | BChN, |
| const int & | EChN | ||
| ) | const |
Definition at line 448 of file dt.cpp.
References CStr(), TInt::GetMn(), TInt::GetMx(), TStr::GetNullStr(), Len(), and TChA().
Referenced by TStrUtil::GetDomNm(), TStrUtil::GetDomNm2(), TStrUtil::GetNormalizedUrl(), TStrUtil::GetShorStr(), TStrUtil::GetWebsiteNm(), and TStrUtil::StripEnd().


| void TChA::Ins | ( | const int & | BChN, |
| const char * | CStr | ||
| ) |
|
inline |
Definition at line 300 of file dt.h.
References SearchCh().

| bool TChA::IsPrefix | ( | const char * | CStr, |
| const int & | BChN = 0 |
||
| ) | const |
Definition at line 499 of file dt.cpp.
References Bf, CStr(), and Len().
Referenced by TStrUtil::GetDomNm(), TStrUtil::GetDomNm2(), TStrUtil::GetNormalizedUrl(), TStrUtil::GetWebsiteNm(), and IsPrefix().


| bool TChA::IsPrefix | ( | const TStr & | Str | ) | const |
Definition at line 510 of file dt.cpp.
References TStr::CStr(), and IsPrefix().

| bool TChA::IsPrefix | ( | const TChA & | Str | ) | const |
Definition at line 514 of file dt.cpp.
References CStr(), and IsPrefix().

|
inline |
Definition at line 292 of file dt.h.
References SearchStr().

| bool TChA::IsSuffix | ( | const char * | CStr | ) | const |
Definition at line 518 of file dt.cpp.
Referenced by TStrUtil::GetWebsiteNm(), and IsSuffix().


| bool TChA::IsSuffix | ( | const TStr & | Str | ) | const |
Definition at line 529 of file dt.cpp.
References TStr::CStr(), and IsSuffix().

| bool TChA::IsSuffix | ( | const TChA & | Str | ) | const |
Definition at line 533 of file dt.cpp.
References CStr(), and IsSuffix().

|
inline |
Definition at line 281 of file dt.h.
References Assert, Bf, and BfL.
Referenced by TXmlLx::GetCDSect(), TUStr::GetChTypeStr(), THtmlLx::GetSym(), TXmlLx::GetSym(), TXmlObjSer::GetTagNm(), THtmlDoc::GetTxtLnDoc(), TSs::LoadTxtFldV(), and TXmlLx::ToNrSpacing().

|
inline |
Definition at line 282 of file dt.h.
References Assert, Bf, and BfL.
Referenced by TXmlLx::GetCDSect(), and TXmlLx::GetSym().

|
inline |
Definition at line 259 of file dt.h.
References BfL.
Referenced by AddChTo(), ChangeCh(), CompressWs(), CountCh(), TUrl::DecodeUrlStr(), TUrlLx::Eof(), THtmlLx::GetAsciiStr(), TXmlLx::GetCDSect(), TUStr::GetChTypeStr(), TStrUtil::GetCleanStr(), TStrUtil::GetCleanWrdStr(), THtmlLxChDef::GetCSZFromWin1250(), THtmlLxChDef::GetCSZFromYuascii(), TStrUtil::GetDomNm(), THtmlLx::GetEscapedStr(), TStr::GetFNmStr(), THtmlLxChDef::GetIsoCeFromYuascii(), THtmlLxChDef::GetLcChA(), TSsParserMP::GetLnStr(), TSsParser::GetLnStr(), TStrUtil::GetShorStr(), GetSubStr(), TXmlLx::GetSym(), TXmlParser::GetSym(), TXmlObjSer::GetTagNm(), TTm::GetTmFromIdStr(), THtmlLxChDef::GetUcChA(), TUrl::GetUrlSearchStr(), TXmlLx::GetUsAsciiStrFromXmlStr(), TStrUtil::GetWebsiteNm(), THtmlLxChDef::GetWin1250FromYuascii(), TXmlDoc::GetXmlStr(), TXmlLx::GetXmlStrFromPlainStr(), IsPrefix(), THttpLx::IsRespStatusLn(), IsSuffix(), TXmlLx::IsTagNm(), operator+=(), TUniChDb::TSubcatHelper::ProcessComment(), TSOut::PutStr(), TStrUtil::RemoveHtmlTags(), TSs::SaveTxt(), SaveTxt(), SearchCh(), SearchChBack(), TStrUtil::SplitSentences(), TStrUtil::StripEnd(), TMd5Sig::TMd5Sig(), TMIn::TMIn(), TXmlLx::ToNrSpacing(), and ToTrunc().

|
inline |
Definition at line 616 of file dt.cpp.
References Bf, BfL, CStr(), TSIn::GetBf(), TSIn::Len(), and MxBfL.

|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 387 of file dt.cpp.
References Bf, BfL, TMem::GetBf(), TMem::Len(), and Resize().
Referenced by AddCh(), and Push().


Definition at line 397 of file dt.cpp.
References Bf, BfL, TStr::CStr(), TStr::Len(), and Resize().

| TChA & TChA::operator+= | ( | const char * | CStr | ) |
|
inline |
|
inline |
Definition at line 374 of file dt.cpp.
References Bf, BfL, TStr::CStr(), TStr::Len(), and MxBfL.

| TChA & TChA::operator= | ( | const char * | CStr | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 265 of file dt.h.
References Bf, BfL, and IAssert.
Referenced by THttpResp::AddFldVal(), DelLastCh(), TXmlLx::GetCDSect(), THtmlLx::GetCh(), TXmlLx::GetCh(), THtmlLx::GetFullBTagStr(), THtmlLx::GetSym(), TILx::GetSym(), TXmlObjSer::GetTagNm(), TSs::LoadTxtFldV(), THtmlLx::PutCh(), and TXmlLx::ToNrSpacing().

|
inline |
Definition at line 264 of file dt.h.
References operator+=().
Referenced by TXmlParser::GetSym(), TXmlLx::PutCh(), and THtmlLx::PutCh().


|
inline |
Definition at line 278 of file dt.h.
References Assert, Bf, and BfL.
Referenced by CompressWs(), TStr::GetFNmStr(), THtmlLxChDef::GetLcChA(), TXmlObjSer::GetTagNm(), THtmlLxChDef::GetUcChA(), TXmlLx::GetUsAsciiStrFromXmlStr(), THttpLx::IsRespStatusLn(), TSs::SaveTxt(), Swap(), TXmlLx::ToNrSpacing(), ToTrunc(), and Trunc().

|
private |
| void TChA::Reverse | ( | ) |
Definition at line 440 of file dt.cpp.
Referenced by TUrl::GetDmNm(), and TStr::Reverse().

|
inline |
| void TChA::SaveTxt | ( | const PSOut & | SOut | ) | const |
Definition at line 361 of file dt.cpp.
References BfL, TInt::GetStr(), TXmlLx::GetXmlStrFromPlainStr(), TSOut::PutStr(), and XSaveHdArg.

| int TChA::SearchCh | ( | const char & | Ch, |
| const int & | BChN = 0 |
||
| ) | const |
Definition at line 470 of file dt.cpp.
References Bf, TInt::GetMx(), and Len().
Referenced by TStr::DelChAll(), TStrUtil::GetDomNm(), TStrUtil::GetWebsiteNm(), and IsChIn().


| int TChA::SearchChBack | ( | const char & | Ch, |
| int | BChN = -1 |
||
| ) | const |
Definition at line 477 of file dt.cpp.
References GetCh(), and Len().
Referenced by TStrUtil::GetDomNm().


| int TChA::SearchStr | ( | const TChA & | Str, |
| const int & | BChN = 0 |
||
| ) | const |
Definition at line 485 of file dt.cpp.
References CStr().
Referenced by TStrUtil::GetWebsiteNm(), IsStrIn(), and SearchStr().


| int TChA::SearchStr | ( | const TStr & | Str, |
| const int & | BChN = 0 |
||
| ) | const |
Definition at line 489 of file dt.cpp.
References TStr::CStr(), and SearchStr().

| int TChA::SearchStr | ( | const char * | CStr, |
| const int & | BChN = 0 |
||
| ) | const |
| void TChA::Swap | ( | const int & | ChN1, |
| const int & | ChN2 | ||
| ) |
| void TChA::Swap | ( | TChA & | ChA | ) |
| TChA & TChA::ToLc | ( | ) |
Definition at line 552 of file dt.cpp.
References Bf.
Referenced by TStrUtil::GetDomNm(), TUrlLx::GetHost(), TStrUtil::GetNormalizedUrl(), and TUrlLx::GetScheme().

| TChA & TChA::ToTrunc | ( | ) |
Definition at line 568 of file dt.cpp.
References GetCh(), TCh::IsWs(), Len(), PutCh(), and Trunc().
Referenced by TILx::GetStrToEoln().


| TChA & TChA::ToUc | ( | ) |
| void TChA::Trunc | ( | ) |
Definition at line 420 of file dt.cpp.
References BfL, Clr(), GetCh(), and PutCh().
Referenced by CompressWs(), TILx::GetSym(), TUrl::GetTopDownDocNm(), TSs::LoadTxtFldV(), TXmlLx::ToNrSpacing(), ToTrunc(), and TPreproc::TPreproc().


|
inline |
|
private |
Definition at line 204 of file dt.h.
Referenced by AddBf(), ChangeCh(), Clr(), CountCh(), CStr(), Del(), Ins(), IsPrefix(), IsSuffix(), LastCh(), LastLastCh(), Load(), LoadTxt(), operator!=(), operator()(), operator+=(), operator=(), operator==(), operator[](), Pop(), PutCh(), Resize(), Reverse(), Save(), SearchCh(), SearchStr(), Swap(), TChA(), ToLc(), ToUc(), Trunc(), and ~TChA().
|
private |
Definition at line 203 of file dt.h.
Referenced by AddBf(), AddCh(), Clr(), Del(), Empty(), Ins(), LastCh(), LastLastCh(), Len(), Load(), LoadTxt(), operator!=(), operator+=(), operator=(), operator==(), operator[](), Pop(), PutCh(), Reverse(), Save(), SaveXml(), Swap(), TChA(), and Trunc().
|
private |
Definition at line 203 of file dt.h.
Referenced by AddBf(), GetMemUsed(), Load(), LoadTxt(), operator+=(), operator=(), Resize(), Save(), Swap(), and TChA().