NCBI C++ ToolKit
Classes | Macros | Typedefs | Enumerations | Enumerator | Functions | Variables | Friends
String Manipulations
+ Collaboration diagram for String Manipulations:

Classes

class  CTempXStr< _TChar >
 
class  XStr
 XStr –. More...
 
class  CNcbiEmptyString
 Empty "C++" string. More...
 
class  CNcbiEmptyWString
 
class  NStr
 NStr –. More...
 
class  NStr::IWrapDest
 
class  NStr::CWrapDestStringList
 
class  CUtf8
 CUtf8 –. More...
 
class  CParseTemplException< TBase >
 CParseTemplException –. More...
 
class  CStringException
 CStringException –. More...
 
class  IStringDecoder
 CStringPairsParser –. More...
 
class  IStringEncoder
 Encoder interface. Names and values can be encoded with different rules. More...
 
class  CStringDecoder_Url
 URL-decoder for string pairs parser. More...
 
class  CStringEncoder_Url
 URL-encoder for string pairs parser. More...
 
class  CStringPairs< TContainer >
 Template for parsing string into pairs of name and value or merging them back into a single string. More...
 
class  CEncodedString
 CEncodedString –. More...
 
struct  PCase_Generic< T >
 Define Case-sensitive string comparison methods. More...
 
struct  PNocase_Generic< T >
 Define Case-insensitive string comparison methods. More...
 
class  PNocase_Conditional_Generic< T >
 Define Case-insensitive string comparison methods. More...
 
class  PEqualNocase_Generic< T >
 Define Case-insensitive string equality (not less-than) comparison method. More...
 
class  PEqualNocase_Conditional_Generic< T >
 Define Case-insensitive string equality (not less-than) comparison method Case sensitivity can be turned on and off at runtime. More...
 
struct  PQuickStringLess
 PQuickStringLess implements an ordering of strings, that is more efficient than usual lexicographical order. More...
 
struct  CStrDummyTokenPos
 Do-nothing token position container. More...
 
struct  CStrDummyTokenCount
 Do nothing token counter. More...
 
struct  CStrDummyTargetReserve< TV, TP >
 Do nothing target reservation trait. More...
 
class  CTempStringList
 Singly-linked list of substrings that will constitute a single Split/Tokenize piece, optimized for the typical one-node case. More...
 
struct  CTempStringList::SNode
 
class  CStrTokenizeBase
 
class  CStrTokenize< TStr, TV, TP, TCount, TReserve >
 Main tokenization algorithm. More...
 
struct  CStringTokenCount
 token count trait for std::string More...
 
struct  CStrTargetReserve< TV, TP, TCount >
 Target reservation trait (applies for vector<>) More...
 
class  CStrTokenPosAdapter< TPosContainer >
 Adapter for token position container pointer(NULL legal) Makes pointer to a container look as a legal container. More...
 
class  CTempString
 CTempString implements a light-weight string on top of a storage buffer whose lifetime management is known and controlled. More...
 
class  CTempStringEx
 
class  CTempString_Storage
 Helper class to allocate memory for CTempString[Ex] on demand in the functions which need to modify the strings (e.g. More...
 
class  CTextJoiner< num_prealloc, TIn, TOut >
 CTextJoiner<> – template for efficiently collecting and joining strings. More...
 

Macros

#define NCBI_TEXT(x)   x
 
#define NcbiEmptyCStr   NCBI_NS_NCBI::kEmptyCStr
 
#define NcbiEmptyWCStr   NCBI_NS_NCBI::kEmptyWCStr
 
#define NcbiEmptyString   NCBI_NS_NCBI::CNcbiEmptyString::Get()
 
#define kEmptyStr   NcbiEmptyString
 
#define NcbiEmptyWString   NCBI_NS_NCBI::CNcbiEmptyWString::Get()
 
#define kEmptyWStr   NcbiEmptyWString
 
#define NPOS   NCBI_NS_STD::string::npos
 
#define _TX(x)   x
 
#define _T_XSTRING(x)   (x)
 
#define _T_STDSTRING(x)   (x)
 
#define _T_XCSTRING(x)   ncbi::impl_ToCString(x)
 
#define _T_CSTRING(x)   (x)
 
#define NcbiEmptyXCStr   NcbiEmptyCStr
 
#define NcbiEmptyXString   NcbiEmptyString
 
#define kEmptyXStr   kEmptyStr
 
#define kEmptyXCStr   kEmptyCStr
 
#define NCBITOOLKIT_USE_LONG_UCS4   (SIZEOF_LONG == 4)
 
#define NCBI_TEMPSTR_MAKE_COPY()
 
#define NCBI_TEMPSTR_DESTROY_COPY()
 

Typedefs

typedef NCBI_NS_STD::string::size_type SIZE_TYPE
 
typedef Uint4 TUnicodeSymbol
 Unicode character. More...
 
typedef basic_string< TUnicodeSymbolTStringUnicode
 Unicode string. More...
 
typedef char TXChar
 
typedef string TXString
 
typedef int NStr::TNumToStringFlags
 Bitwise OR of "ENumToStringFlags". More...
 
typedef EStringToNumFlags NStr::EConvErrFlags
 Formerly split out. More...
 
typedef int NStr::TStringToNumFlags
 Bitwise OR of "EStringToNumFlags". More...
 
typedef TStringToNumFlags NStr::TConvErrFlags
 Formerly split out. More...
 
typedef int NStr::TSplitFlags
 Bitwise OR of ESplitFlags. More...
 
typedef int NStr::TPrintableMode
 Bitwise OR of EPrintableMode flags. More...
 
typedef int NStr::TSS_Flags
 Bitwise OR of ESS_Flags. More...
 
typedef int NStr::TXmlEncode
 
typedef int NStr::THtmlEncode
 
typedef int NStr::THtmlDecode
 
typedef int NStr::TWrapFlags
 Bitwise OR of "EWrapFlags". More...
 
typedef int NStr::TDedentFlags
 Bitwise OR of EDedentFlags. More...
 
typedef TUnicodeSymbol TCharUCS4
 
typedef TStringUnicode TStringUCS4
 
typedef Uint2 TCharUCS2
 Type for character in UCS-2 encoding. More...
 
typedef basic_string< TCharUCS2TStringUCS2
 Type for string in UCS-2 encoding. More...
 
typedef int CParseTemplException< TBase >::TErrCode
 
typedef TContainer CStringPairs< TContainer >::TStrPairs
 
typedef TContainer::value_type CStringPairs< TContainer >::TStrPair
 The container's value type must be pair<string, string> or a compatible type. More...
 
typedef vector< pair< string, string > > TStringPairsVector
 
typedef CStringPairs< TStringPairsVectorCStringPairsParser
 
typedef PCase_Generic< stringPCase
 
typedef PCase_Generic< const char * > PCase_CStr
 
typedef PNocase_Generic< stringPNocase
 
typedef PNocase_Generic< const char * > PNocase_CStr
 
typedef PNocase_Conditional_Generic< stringPNocase_Conditional
 
typedef PNocase_Conditional_Generic< const char * > PNocase_Conditional_CStr
 
typedef PEqualNocase_Generic< stringPEqualNocase
 
typedef PEqualNocase_Generic< const char * > PEqualNocase_CStr
 
typedef PEqualNocase_Conditional_Generic< stringPEqualNocase_Conditional
 
typedef PEqualNocase_Conditional_Generic< const char * > PEqualNocase_Conditional_CStr
 
typedef NStr::TSplitFlags CStrTokenizeBase::TFlags
 
typedef TStr CStrTokenize< TStr, TV, TP, TCount, TReserve >::TString
 
typedef TV CStrTokenize< TStr, TV, TP, TCount, TReserve >::TContainer
 
typedef TP CStrTokenize< TStr, TV, TP, TCount, TReserve >::TPosContainer
 
typedef TCount CStrTokenize< TStr, TV, TP, TCount, TReserve >::TCountTrait
 
typedef TReserve CStrTokenize< TStr, TV, TP, TCount, TReserve >::TReserveTrait
 
typedef CTempString::size_type CTempString_Storage::size_type
 
typedef char * CTempString_Storage::TBuffer
 
typedef list< TBufferCTempString_Storage::TData
 

Enumerations

enum  ENcbiStrings { eNcbiStrings_Stat , eNcbiStrings_PHID }
 
enum  XStr::ECase { XStr::eCase , XStr::eNocase }
 
enum  EEncoding {
  eEncoding_Unknown , eEncoding_UTF8 , eEncoding_Ascii , eEncoding_ISO8859_1 ,
  eEncoding_Windows_1252 , eEncoding_CESU8
}
 
enum  NStr::ENumToStringFlags {
  NStr::fUseLowercase = (1 << 4) , NStr::fWithRadix = (1 << 5) , NStr::fWithSign = (1 << 6) , NStr::fWithCommas = (1 << 7) ,
  NStr::fDoubleFixed = (1 << 8) , NStr::fDoubleScientific = (1 << 9) , NStr::fDoublePosix = (1 << 10) , NStr::fDoubleGeneral = fDoubleFixed | fDoubleScientific ,
  NStr::fDS_Binary = (1 << 11) , NStr::fDS_NoDecimalPoint = (1 << 12) , NStr::fDS_PutSpaceBeforeSuffix = (1 << 13) , NStr::fDS_ShortSuffix = (1 << 14) ,
  NStr::fDS_PutBSuffixToo = (1 << 15)
}
 Number to string conversion flags. More...
 
enum  NStr::EStringToNumFlags {
  NStr::fConvErr_NoThrow = (1 << 0) , NStr::fConvErr_NoErrMessage = (1 << 2) , NStr::fMandatorySign = (1 << 17) , NStr::fAllowCommas = (1 << 18) ,
  NStr::fAllowLeadingSpaces = (1 << 19) , NStr::fAllowLeadingSymbols = (1 << 20) | fAllowLeadingSpaces , NStr::fAllowTrailingSpaces = (1 << 21) , NStr::fAllowTrailingSymbols = (1 << 22) | fAllowTrailingSpaces ,
  NStr::fDecimalPosix = (1 << 23) , NStr::fDecimalPosixOrLocal = (1 << 24) , NStr::fDecimalPosixFinite = (1 << 25) , NStr::fDS_ForceBinary = (1 << 26) ,
  NStr::fDS_ProhibitFractions = (1 << 27) , NStr::fDS_ProhibitSpaceBeforeSuffix = (1 << 28)
}
 String to number conversion flags. More...
 
enum  NStr::ECase { NStr::eCase , NStr::eNocase }
 Which type of string comparison. More...
 
enum  NStr::EOccurrence { NStr::eFirst , NStr::eLast }
 Whether it is the first or last occurrence. More...
 
enum  NStr::EDirection { NStr::eForwardSearch = 0 , NStr::eReverseSearch }
 Search direction for Find() methods. More...
 
enum  NStr::ETrunc { NStr::eTrunc_Begin , NStr::eTrunc_End , NStr::eTrunc_Both }
 Which end to truncate a string. More...
 
enum  NStr::ESplitFlags {
  NStr::fSplit_MergeDelimiters = 1 << 0 , NStr::fSplit_Truncate_Begin = 1 << 1 , NStr::fSplit_Truncate_End = 1 << 2 , NStr::fSplit_Truncate = fSplit_Truncate_Begin | fSplit_Truncate_End ,
  NStr::fSplit_ByPattern = 1 << 3 , NStr::fSplit_CanEscape = 1 << 4 , NStr::fSplit_CanSingleQuote = 1 << 5 , NStr::fSplit_CanDoubleQuote = 1 << 6 ,
  NStr::fSplit_CanQuote = fSplit_CanSingleQuote | fSplit_CanDoubleQuote , NStr::fSplit_Tokenize = fSplit_MergeDelimiters | fSplit_Truncate
}
 Flags for Split*() methods. More...
 
enum  NStr::EMergeDelims { NStr::eMergeDelims = fSplit_MergeDelimiters | fSplit_Truncate , NStr::eNoMergeDelims = 0 }
 Whether to merge adjacent delimiters. More...
 
enum  NStr::EPrintableMode {
  NStr::fNewLine_Quote = 0 , NStr::eNewLine_Quote = fNewLine_Quote , NStr::fNewLine_Passthru = 1 , NStr::eNewLine_Passthru = fNewLine_Passthru ,
  NStr::fNonAscii_Passthru = 0 , NStr::fNonAscii_Quote = 2 , NStr::fPrintable_Full = 64
}
 How to display printable strings. More...
 
enum  NStr::ESS_Flags {
  NStr::fSS_alpha = 1 << 0 , NStr::fSS_digit = 1 << 1 , NStr::fSS_alnum = 1 << 2 , NStr::fSS_print = 1 << 3 ,
  NStr::fSS_cntrl = 1 << 4 , NStr::fSS_punct = 1 << 5 , NStr::fSS_Reject = 1 << 11 , NStr::fSS_Remove = 1 << 12 ,
  NStr::fSS_NoMerge = 1 << 13 , NStr::fSS_NoTruncate_Begin = 1 << 14 , NStr::fSS_NoTruncate_End = 1 << 15 , NStr::fSS_NoTruncate = fSS_NoTruncate_Begin | fSS_NoTruncate_End
}
 Flags for Sanitize(). More...
 
enum  NStr::EEscSeqRange {
  NStr::eEscSeqRange_Standard , NStr::eEscSeqRange_FirstByte , NStr::eEscSeqRange_Throw , NStr::eEscSeqRange_Errno ,
  NStr::eEscSeqRange_User
}
 C-style escape sequences parsing mode. More...
 
enum  NStr::EQuoted { NStr::eQuoted , NStr::eNotQuoted }
 Define that string is quoted or not. More...
 
enum  NStr::EXmlEncode { NStr::eXmlEnc_Contents = 0 , NStr::eXmlEnc_CommentSafe = 1 << 0 , NStr::eXmlEnc_Unsafe_Skip = 1 << 1 , NStr::eXmlEnc_Unsafe_Throw = 1 << 2 }
 XML-encode flags. More...
 
enum  NStr::EHtmlEncode {
  NStr::fHtmlEnc_EncodeAll = 0 , NStr::fHtmlEnc_SkipLiteralEntities = 1 << 1 , NStr::fHtmlEnc_SkipNumericEntities = 1 << 2 , NStr::fHtmlEnc_SkipEntities = fHtmlEnc_SkipLiteralEntities | fHtmlEnc_SkipNumericEntities ,
  NStr::fHtmlEnc_CheckPreencoded = 1 << 3
}
 HTML-decode flags. More...
 
enum  NStr::EHtmlDecode { NStr::fHtmlDec_CharRef_Entity = 1 , NStr::fHtmlDec_CharRef_Numeric = 1 << 1 , NStr::fHtmlDec_Encoding_Changed = 1 << 2 }
 HTML-decode flags. More...
 
enum  NStr::EJsonEncode { NStr::eJsonEnc_UTF8 , NStr::eJsonEnc_Quoted }
 Json-encode flags. More...
 
enum  NStr::EUrlEncode {
  NStr::eUrlEnc_SkipMarkChars , NStr::eUrlEnc_ProcessMarkChars , NStr::eUrlEnc_PercentOnly , NStr::eUrlEnc_Path ,
  NStr::eUrlEnc_URIScheme , NStr::eUrlEnc_URIUserinfo , NStr::eUrlEnc_URIHost , NStr::eUrlEnc_URIPath ,
  NStr::eUrlEnc_URIQueryName , NStr::eUrlEnc_URIQueryValue , NStr::eUrlEnc_URIFragment , NStr::eUrlEnc_Cookie ,
  NStr::eUrlEnc_None
}
 URL-encode flags. More...
 
enum  NStr::EUrlDecode { NStr::eUrlDec_All , NStr::eUrlDec_Percent }
 URL decode flags. More...
 
enum  NStr::ESqlEncode { NStr::eSqlEnc_Plain , NStr::eSqlEnc_TagNonASCII }
 SQL encode flags. More...
 
enum  NStr::EWrapFlags { NStr::fWrap_Hyphenate = 0x1 , NStr::fWrap_HTMLPre = 0x2 , NStr::fWrap_FlatFile = 0x4 }
 How to wrap the words in a string to a new line. More...
 
enum  NStr::EDedentFlags { NStr::fDedent_NormalizeEmptyLines = 1 << 0 , NStr::fDedent_SkipFirstLine = 1 << 1 , NStr::fDedent_SkipEmptyFirstLine = 1 << 2 }
 Flags for Dedent() method. More...
 
enum  CUtf8::EValidate { CUtf8::eNoValidate , CUtf8::eValidate }
 How to verify character encoding of the source data. More...
 
enum  CParseTemplException< TBase >::EErrCode { CParseTemplException< TBase >::eErr }
 Error types that for exception class. More...
 
enum  CStringException::EErrCode { CStringException::eConvert , CStringException::eBadArgs , CStringException::eFormat }
 Error types that string classes can generate. More...
 
enum  IStringDecoder::EStringType { IStringDecoder::eName , IStringDecoder::eValue }
 Type of string to be decoded. More...
 
enum  IStringEncoder::EStringType { IStringEncoder::eName , IStringEncoder::eValue }
 Type of string to be decoded. More...
 
enum  CTempStringEx::EZeroAtEnd { CTempStringEx::eNoZeroAtEnd , CTempStringEx::eHasZeroAtEnd }
 

Functions

const char * g_GetNcbiString (ENcbiStrings what)
 
 CTempXStr< _TChar >::CTempXStr (void)
 
 CTempXStr< _TChar >::CTempXStr (const CTempXStr &lw)
 
 CTempXStr< _TChar >::CTempXStr (const _TChar *str)
 
 CTempXStr< _TChar >::CTempXStr (const _TChar *str, size_t len)
 
 CTempXStr< _TChar >::CTempXStr (const _TChar *str, size_t pos, size_t len)
 
 CTempXStr< _TChar >::CTempXStr (const basic_string< _TChar > &str)
 
 CTempXStr< _TChar >::CTempXStr (const basic_string< _TChar > &str, size_t len)
 
 CTempXStr< _TChar >::CTempXStr (const basic_string< _TChar > &str, size_t pos, size_t len)
 
 CTempXStr< _TChar >::operator basic_string< _TChar > (void) const
 
const _TChar * CTempXStr< _TChar >::data (void) const
 
size_t CTempXStr< _TChar >::length (void) const
 
bool CTempXStr< _TChar >::empty (void) const
 
_TChar CTempXStr< _TChar >::operator[] (size_t pos) const
 
int CTempXStr< _TChar >::CompareCase (const CTempXStr< _TChar > &pattern) const
 
int CTempXStr< _TChar >::CompareNocase (const CTempXStr< _TChar > &pattern) const
 
static size_t CTempXStr< _TChar >::x_npos (void)
 
size_t CTempXStr< _TChar >::x_length (void) const
 
template<typename _TChar >
static int XStr::CompareCase (const basic_string< _TChar > &str, SIZE_TYPE pos, SIZE_TYPE n, const _TChar *pattern)
 
template<typename _TChar >
static int XStr::CompareCase (const _TChar *str, SIZE_TYPE pos, SIZE_TYPE n, const _TChar *pattern)
 
template<typename _TChar >
static int XStr::CompareCase (const basic_string< _TChar > &str, SIZE_TYPE pos, SIZE_TYPE n, const basic_string< _TChar > &pattern)
 
template<typename _TChar >
static int XStr::CompareCase (const _TChar *str, SIZE_TYPE pos, SIZE_TYPE n, const basic_string< _TChar > &pattern)
 
template<typename _TChar >
static int XStr::CompareNocase (const basic_string< _TChar > &str, SIZE_TYPE pos, SIZE_TYPE n, const _TChar *pattern)
 
template<typename _TChar >
static int XStr::CompareNocase (const _TChar *str, SIZE_TYPE pos, SIZE_TYPE n, const _TChar *pattern)
 
template<typename _TChar >
static int XStr::CompareNocase (const basic_string< _TChar > &str, SIZE_TYPE pos, SIZE_TYPE n, const basic_string< _TChar > &pattern)
 
template<typename _TChar >
static int XStr::CompareNocase (const _TChar *str, SIZE_TYPE pos, SIZE_TYPE n, const basic_string< _TChar > &pattern)
 
template<typename _TChar >
static int XStr::Compare (const basic_string< _TChar > &str, SIZE_TYPE pos, SIZE_TYPE n, const _TChar *pattern, ECase use_case=eCase)
 
template<typename _TChar >
static int XStr::Compare (const _TChar *str, SIZE_TYPE pos, SIZE_TYPE n, const _TChar *pattern, ECase use_case=eCase)
 
template<typename _TChar >
static int XStr::Compare (const basic_string< _TChar > &str, SIZE_TYPE pos, SIZE_TYPE n, const basic_string< _TChar > &pattern, ECase use_case=eCase)
 
template<typename _TChar >
static int XStr::Compare (const _TChar *str, SIZE_TYPE pos, SIZE_TYPE n, const basic_string< _TChar > &pattern, ECase use_case=eCase)
 
template<typename _TChar >
static int XStr::strcmp (const _TChar *s1, const _TChar *s2)
 
template<typename _TChar >
static int XStr::strncmp (const _TChar *s1, const _TChar *s2, size_t n)
 
template<typename _TChar >
static int XStr::strcasecmp (const _TChar *s1, const _TChar *s2)
 
template<typename _TChar >
static int XStr::strncasecmp (const _TChar *s1, const _TChar *s2, size_t n)
 
template<typename _TChar >
static int XStr::CompareCase (const _TChar *s1, const _TChar *s2)
 
template<typename _TChar >
static int XStr::CompareCase (const basic_string< _TChar > &s1, const basic_string< _TChar > &s2)
 
template<typename _TChar >
static int XStr::CompareNocase (const _TChar *s1, const _TChar *s2)
 
template<typename _TChar >
static int XStr::CompareNocase (const basic_string< _TChar > &s1, const basic_string< _TChar > &s2)
 
template<typename _TChar >
static int XStr::Compare (const basic_string< _TChar > &s1, const _TChar *s2, ECase use_case=eCase)
 
template<typename _TChar >
static int XStr::Compare (const _TChar *s1, const _TChar *s2, ECase use_case=eCase)
 
template<typename _TChar >
static int XStr::Compare (const basic_string< _TChar > &s1, const basic_string< _TChar > &s2, ECase use_case=eCase)
 
template<typename _TChar >
static int XStr::Compare (const _TChar *s1, const basic_string< _TChar > &s2, ECase use_case=eCase)
 
static const stringCNcbiEmptyString::Get (void)
 Get string. More...
 
static const wstring & CNcbiEmptyWString::Get (void)
 Get string. More...
 
const char * impl_ToCString (const char *s)
 
const char * impl_ToCString (const string &s)
 
template<typename TNumeric >
static TNumeric NStr::StringToNumeric (const CTempString str, TStringToNumFlags flags=0, int base=10)
 Convert string to a numeric value. More...
 
template<typename TNumeric >
static bool NStr::StringToNumeric (const CTempString str, TNumeric *value, TStringToNumFlags flags=0, int base=10)
 Convert string to a numeric value. More...
 
static int NStr::StringToNonNegativeInt (const CTempString str, TStringToNumFlags flags=0)
 Convert string to non-negative integer value. More...
 
static int NStr::StringToNumeric (const string &str)
 
static int NStr::StringToInt (const CTempString str, TStringToNumFlags flags=0, int base=10)
 Convert string to int. More...
 
static unsigned int NStr::StringToUInt (const CTempString str, TStringToNumFlags flags=0, int base=10)
 Convert string to unsigned int. More...
 
static long NStr::StringToLong (const CTempString str, TStringToNumFlags flags=0, int base=10)
 Convert string to long. More...
 
static unsigned long NStr::StringToULong (const CTempString str, TStringToNumFlags flags=0, int base=10)
 Convert string to unsigned long. More...
 
static double NStr::StringToDoublePosix (const char *str, char **endptr=0, TStringToNumFlags flags=0)
 Convert string to double-precision value (analog of strtod function) More...
 
static double NStr::StringToDouble (const CTempStringEx str, TStringToNumFlags flags=0)
 Convert string to double. More...
 
static double NStr::StringToDoubleEx (const char *str, size_t size, TStringToNumFlags flags=0)
 This version accepts zero-terminated string. More...
 
static Int8 NStr::StringToInt8 (const CTempString str, TStringToNumFlags flags=0, int base=10)
 Convert string to Int8. More...
 
static Uint8 NStr::StringToUInt8 (const CTempString str, TStringToNumFlags flags=0, int base=10)
 Convert string to Uint8. More...
 
static Uint8 NStr::StringToUInt8_DataSize (const CTempString str, TStringToNumFlags flags=0)
 Convert string that can contain "software" qualifiers to Uint8. More...
 
static Uint8 NStr::StringToUInt8_DataSize (const CTempString str, TStringToNumFlags flags, int base)
 Convert string to number of bytes. More...
 
static size_t NStr::StringToSizet (const CTempString str, TStringToNumFlags flags=0, int base=10)
 Convert string to size_t. More...
 
static const void * NStr::StringToPtr (const CTempStringEx str, TStringToNumFlags flags=0)
 Convert string to pointer. More...
 
static int NStr::HexChar (char ch)
 Convert character to integer. More...
 
template<typename TNumeric >
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NStr::NumericToString (TNumeric value, TNumToStringFlags flags=0, int base=10)
 Convert numeric value to string. More...
 
template<typename TStrictId >
static enable_if< is_integral< typename TStrictId::TId >::value &&is_member_function_pointer< decltype(&TStrictId::Get)>::value, string >::type NStr::NumericToString (TStrictId value, TNumToStringFlags flags=0, int base=10)
 
template<typename TNumeric >
static void NStr::NumericToString (string &out_str, TNumeric value, TNumToStringFlags flags=0, int base=10)
 Convert numeric value to string. More...
 
static string NStr::IntToString (int value, TNumToStringFlags flags=0, int base=10)
 Convert int to string. More...
 
static string NStr::IntToString (unsigned int value, TNumToStringFlags flags=0, int base=10)
 
static void NStr::IntToString (string &out_str, int value, TNumToStringFlags flags=0, int base=10)
 Convert int to string. More...
 
static void NStr::IntToString (string &out_str, unsigned int value, TNumToStringFlags flags=0, int base=10)
 
static string NStr::UIntToString (unsigned int value, TNumToStringFlags flags=0, int base=10)
 Convert UInt to string. More...
 
static string NStr::UIntToString (int value, TNumToStringFlags flags=0, int base=10)
 
static void NStr::UIntToString (string &out_str, unsigned int value, TNumToStringFlags flags=0, int base=10)
 Convert UInt to string. More...
 
static void NStr::UIntToString (string &out_str, int value, TNumToStringFlags flags=0, int base=10)
 
static string NStr::LongToString (long value, TNumToStringFlags flags=0, int base=10)
 Convert Int to string. More...
 
static void NStr::LongToString (string &out_str, long value, TNumToStringFlags flags=0, int base=10)
 Convert Int to string. More...
 
static string NStr::ULongToString (unsigned long value, TNumToStringFlags flags=0, int base=10)
 Convert unsigned long to string. More...
 
static void NStr::ULongToString (string &out_str, unsigned long value, TNumToStringFlags flags=0, int base=10)
 Convert unsigned long to string. More...
 
static string NStr::Int8ToString (Int8 value, TNumToStringFlags flags=0, int base=10)
 Convert Int8 to string. More...
 
static void NStr::Int8ToString (string &out_str, Int8 value, TNumToStringFlags flags=0, int base=10)
 Convert Int8 to string. More...
 
static string NStr::UInt8ToString (Uint8 value, TNumToStringFlags flags=0, int base=10)
 Convert UInt8 to string. More...
 
static void NStr::UInt8ToString (string &out_str, Uint8 value, TNumToStringFlags flags=0, int base=10)
 Convert UInt8 to string. More...
 
static string NStr::UInt8ToString_DataSize (Uint8 value, TNumToStringFlags flags=0, unsigned int max_digits=3)
 Convert UInt8 to string using "software" qualifiers. More...
 
static void NStr::UInt8ToString_DataSize (string &out_str, Uint8 value, TNumToStringFlags flags=0, unsigned int max_digits=3)
 Convert UInt8 to string using "software" qualifiers. More...
 
static string NStr::DoubleToString (double value, int precision=-1, TNumToStringFlags flags=0)
 Convert double to string. More...
 
static void NStr::DoubleToString (string &out_str, double value, int precision=-1, TNumToStringFlags flags=0)
 Convert double to string. More...
 
static SIZE_TYPE NStr::DoubleToString (double value, unsigned int precision, char *buf, SIZE_TYPE buf_size, TNumToStringFlags flags=0)
 Convert double to string with specified precision and place the result in the specified buffer. More...
 
static SIZE_TYPE NStr::DoubleToStringPosix (double value, unsigned int precision, char *buf, SIZE_TYPE buf_size)
 Convert double to string with specified precision and put the result into a character buffer, in scientific format. More...
 
static SIZE_TYPE NStr::DoubleToString_Ecvt (double value, unsigned int precision, char *buf, SIZE_TYPE buf_size, int *dec, int *sign)
 Convert double to string with specified precision. More...
 
static string NStr::SizetToString (size_t value, TNumToStringFlags flags=0, int base=10)
 Convert size_t to string. More...
 
static void NStr::PtrToString (string &out_str, const void *ptr)
 Convert pointer to string. More...
 
static string NStr::PtrToString (const void *ptr)
 Convert pointer to string. More...
 
static const string NStr::BoolToString (bool value)
 Convert bool to string. More...
 
static bool NStr::StringToBool (const CTempString str)
 Convert string to bool. More...
 
static string NStr::FormatVarargs (const char *format, va_list args)
 Handle an arbitrary printf-style format string. More...
 
static int NStr::CompareCase (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
 Case-sensitive compare of a substring with another string. More...
 
static int NStr::CompareCase (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const CTempString s2)
 Case-sensitive compare of a substring with another string. More...
 
static int NStr::CompareCase (const char *s1, const char *s2)
 Case-sensitive compare of two strings – char* version. More...
 
static int NStr::CompareCase (const CTempStringEx s1, const CTempStringEx s2)
 Case-sensitive compare of two strings – CTempStringEx version. More...
 
static int NStr::CompareNocase (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
 Case-insensitive compare of a substring with another string. More...
 
static int NStr::CompareNocase (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const CTempString s2)
 Case-insensitive compare of a substring with another string. More...
 
static int NStr::CompareNocase (const char *s1, const char *s2)
 Case-insensitive compare of two strings – char* version. More...
 
static int NStr::CompareNocase (const CTempStringEx s1, const CTempStringEx s2)
 Case-insensitive compare of two strings – CTempStringEx version. More...
 
static int NStr::Compare (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase)
 Compare of a substring with another string. More...
 
static int NStr::Compare (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const CTempString s2, ECase use_case=eCase)
 Compare of a substring with another string. More...
 
static int NStr::Compare (const char *s1, const char *s2, ECase use_case=eCase)
 Compare two strings – char* version. More...
 
static int NStr::Compare (const CTempStringEx s1, const CTempStringEx s2, ECase use_case=eCase)
 Compare two strings – CTempStringEx version. More...
 
static bool NStr::EqualCase (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
 Case-sensitive equality of a substring with another string. More...
 
static bool NStr::EqualCase (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const CTempString s2)
 Case-sensitive equality of a substring with another string. More...
 
static bool NStr::EqualCase (const char *s1, const char *s2)
 Case-sensitive equality of two strings – char* version. More...
 
static bool NStr::EqualCase (const CTempStringEx s1, const CTempStringEx s2)
 Case-sensitive equality of two strings. More...
 
static bool NStr::EqualNocase (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
 Case-insensitive equality of a substring with another string. More...
 
static bool NStr::EqualNocase (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const CTempString s2)
 Case-insensitive equality of a substring with another string. More...
 
static bool NStr::EqualNocase (const char *s1, const char *s2)
 Case-insensitive equality of two strings – char* version. More...
 
static bool NStr::EqualNocase (const CTempStringEx s1, const CTempStringEx s2)
 Case-insensitive equality of two strings. More...
 
static bool NStr::Equal (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase)
 Test for equality of a substring with another string. More...
 
static bool NStr::Equal (const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const CTempString s2, ECase use_case=eCase)
 Test for equality of a substring with another string. More...
 
static bool NStr::Equal (const char *s1, const char *s2, ECase use_case=eCase)
 Test for equality of two strings – char* version. More...
 
static bool NStr::Equal (const CTempStringEx s1, const CTempStringEx s2, ECase use_case=eCase)
 Test for equality of two strings. More...
 
static int NStr::strcmp (const char *s1, const char *s2)
 String compare. More...
 
static int NStr::strncmp (const char *s1, const char *s2, size_t n)
 String compare up to specified number of characters. More...
 
static int NStr::strcasecmp (const char *s1, const char *s2)
 Case-insensitive comparison of two zero-terminated strings. More...
 
static int NStr::strncasecmp (const char *s1, const char *s2, size_t n)
 Case-insensitive comparison of two zero-terminated strings, narrowed to the specified number of characters. More...
 
static size_t NStr::strftime (char *s, size_t maxsize, const char *format, const struct tm *timeptr)
 Wrapper for the function strftime() that corrects handling D and T time formats on MS Windows. More...
 
static bool NStr::MatchesMask (CTempString str, CTempString mask, ECase use_case=eCase)
 Match "str" against the "mask". More...
 
static bool NStr::IsBlank (const CTempString str, SIZE_TYPE pos=0)
 Check if a string is blank (has no text). More...
 
static bool NStr::IsLower (const CTempString str)
 Checks if all letters in the given string have a lower case. More...
 
static bool NStr::IsUpper (const CTempString str)
 Checks if all letters in the given string have a upper case. More...
 
static stringNStr::ToLower (string &str)
 Convert string to lower case – string& version. More...
 
static char * NStr::ToLower (char *str)
 Convert string to lower case – char* version. More...
 
static stringNStr::ToUpper (string &str)
 Convert string to upper case – string& version. More...
 
static char * NStr::ToUpper (char *str)
 Convert string to upper case – char* version. More...
 
static void NStr::ToLower (const char *)
 Privatized ToLower() with const char* parameter to prevent passing of constant strings. More...
 
static void NStr::ToUpper (const char *)
 Privatized ToUpper() with const char* parameter to prevent passing of constant strings. More...
 
static bool NStr::StartsWith (const CTempString str, const CTempString start, ECase use_case=eCase)
 Check if a string starts with a specified prefix value. More...
 
static bool NStr::StartsWith (const CTempString str, char start, ECase use_case=eCase)
 Check if a string starts with a specified character value. More...
 
static bool NStr::EndsWith (const CTempString str, const CTempString end, ECase use_case=eCase)
 Check if a string ends with a specified suffix value. More...
 
static bool NStr::EndsWith (const CTempString str, char end, ECase use_case=eCase)
 Check if a string ends with a specified character value. More...
 
static SIZE_TYPE NStr::CommonPrefixSize (const CTempString s1, const CTempString s2)
 Determine the common prefix of two strings. More...
 
static SIZE_TYPE NStr::CommonSuffixSize (const CTempString s1, const CTempString s2)
 Determine the common suffix of two strings. More...
 
static SIZE_TYPE NStr::CommonOverlapSize (const CTempString s1, const CTempString s2)
 Determine if the suffix of one string is the prefix of another. More...
 
static SIZE_TYPE NStr::Find (const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)
 Find the pattern in the string. More...
 
static SIZE_TYPE NStr::Find (const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst, ECase use_case=eCase)
 Find the pattern in the specified range of a string. More...
 
static SIZE_TYPE NStr::Find (const CTempString str, const CTempString pattern, SIZE_TYPE start)
 Wrapper for backward-compatibility. More...
 
static SIZE_TYPE NStr::FindCase (const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst)
 Find the pattern in the specified range of a string using a case sensitive search. More...
 
static SIZE_TYPE NStr::FindCase (const CTempString str, const CTempString pattern)
 Wrappers for backward-compatibility. More...
 
static SIZE_TYPE NStr::FindCase (const CTempString str, const CTempString pattern, SIZE_TYPE start)
 
static SIZE_TYPE NStr::FindNoCase (const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst)
 Find the pattern in the specified range of a string using a case insensitive search. More...
 
static SIZE_TYPE NStr::FindNoCase (const CTempString str, const CTempString pattern)
 Wrapper for backward-compatibility. More...
 
static SIZE_TYPE NStr::FindNoCase (const CTempString str, const CTempString pattern, SIZE_TYPE start)
 
static const stringNStr::Find (const list< string > &lst, const CTempString val, ECase use_case=eCase)
 Test for presence of a given string in a list or vector of strings. More...
 
static const stringNStr::FindCase (const list< string > &lst, const CTempString val)
 
static const stringNStr::FindNoCase (const list< string > &lst, const CTempString val)
 
static const stringNStr::Find (const vector< string > &vec, const CTempString val, ECase use_case=eCase)
 
static const stringNStr::FindCase (const vector< string > &vec, const CTempString val)
 
static const stringNStr::FindNoCase (const vector< string > &vec, const CTempString val)
 
static SIZE_TYPE NStr::FindWord (const CTempString str, const CTempString word, ECase use_case=eCase, EDirection direction=eForwardSearch)
 Find given word in the string. More...
 
static SIZE_TYPE NStr::FindWord (const CTempString str, const CTempString word, EOccurrence which, ECase use_case=eCase)
 Find given word in the string. More...
 
static string NStr::TruncateSpaces (const string &str, ETrunc where=eTrunc_Both)
 Truncate spaces in a string. More...
 
static CTempString NStr::TruncateSpaces_Unsafe (const CTempString str, ETrunc where=eTrunc_Both)
 Truncate spaces in a string. More...
 
static CTempString NStr::TruncateSpaces (const CTempString str, ETrunc where=eTrunc_Both)
 
static CTempString NStr::TruncateSpaces (const char *str, ETrunc where=eTrunc_Both)
 
static void NStr::TruncateSpacesInPlace (string &str, ETrunc where=eTrunc_Both)
 Truncate spaces in a string (in-place) More...
 
static void NStr::TruncateSpacesInPlace (CTempString &, ETrunc where=eTrunc_Both)
 
static void NStr::TrimPrefixInPlace (string &str, const CTempString prefix, ECase use_case=eCase)
 Trim prefix from a string (in-place) More...
 
static void NStr::TrimPrefixInPlace (CTempString &str, const CTempString prefix, ECase use_case=eCase)
 
static CTempString NStr::TrimPrefix_Unsafe (const CTempString str, const CTempString prefix, ECase use_case=eCase)
 Trim prefix from a string. More...
 
static void NStr::TrimSuffixInPlace (string &str, const CTempString suffix, ECase use_case=eCase)
 Trim suffix from a string (in-place) More...
 
static void NStr::TrimSuffixInPlace (CTempString &str, const CTempString suffix, ECase use_case=eCase)
 
static CTempString NStr::TrimSuffix_Unsafe (const CTempString str, const CTempString suffix, ECase use_case=eCase)
 Trim suffix from a string. More...
 
static stringNStr::Replace (const string &src, const string &search, const string &replace, string &dst, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)
 Replace occurrences of a substring within a string. More...
 
static string NStr::Replace (const string &src, const string &search, const string &replace, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)
 Replace occurrences of a substring within a string and returns the result as a new string. More...
 
static stringNStr::ReplaceInPlace (string &src, const string &search, const string &replace, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)
 Replace occurrences of a substring within a string. More...
 
static list< string > & NStr::Split (const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
 Split a string using specified delimiters. More...
 
static vector< string > & NStr::Split (const CTempString str, const CTempString delim, vector< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
 
static list< CTempString > & NStr::Split (const CTempString str, const CTempString delim, list< CTempString > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL, CTempString_Storage *storage=NULL)
 
static vector< CTempString > & NStr::Split (const CTempString str, const CTempString delim, vector< CTempString > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL, CTempString_Storage *storage=NULL)
 
static list< CTempStringEx > & NStr::Split (const CTempString str, const CTempString delim, list< CTempStringEx > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL, CTempString_Storage *storage=NULL)
 
static vector< CTempStringEx > & NStr::Split (const CTempString str, const CTempString delim, vector< CTempStringEx > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL, CTempString_Storage *storage=NULL)
 
static bool NStr::SplitInTwo (const CTempString str, const CTempString delim, string &str1, string &str2, TSplitFlags flags=0)
 Split a string into two pieces using the specified delimiters. More...
 
static bool NStr::SplitInTwo (const CTempString str, const CTempString delim, CTempString &str1, CTempString &str2, TSplitFlags flags=0, CTempString_Storage *storage=NULL)
 
static bool NStr::SplitInTwo (const CTempString str, const CTempString delim, CTempStringEx &str1, CTempStringEx &str2, TSplitFlags flags=0, CTempString_Storage *storage=NULL)
 
static list< string > & NStr::SplitByPattern (const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
 Variation of Split() with fSplit_ByPattern flag applied by default. More...
 
static vector< string > & NStr::SplitByPattern (const CTempString str, const CTempString delim, vector< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
 
static list< CTempString > & NStr::SplitByPattern (const CTempString str, const CTempString delim, list< CTempString > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL, CTempString_Storage *storage=NULL)
 
static vector< CTempString > & NStr::SplitByPattern (const CTempString str, const CTempString delim, vector< CTempString > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL, CTempString_Storage *storage=NULL)
 
static list< CTempStringEx > & NStr::SplitByPattern (const CTempString str, const CTempString delim, list< CTempStringEx > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL, CTempString_Storage *storage=NULL)
 
static vector< CTempStringEx > & NStr::SplitByPattern (const CTempString str, const CTempString delim, vector< CTempStringEx > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL, CTempString_Storage *storage=NULL)
 
template<typename TContainer >
static string NStr::Join (const TContainer &arr, const CTempString &delim)
 Join strings using the specified delimiter. More...
 
template<typename TValue >
static string NStr::Join (const initializer_list< TValue > &arr, const CTempString &delim)
 
template<typename TInputIterator >
static string NStr::Join (TInputIterator from, TInputIterator to, const CTempString &delim)
 
template<typename TInputIterator >
static string NStr::JoinNumeric (TInputIterator from, TInputIterator to, const CTempString &delim)
 
template<typename TIterator , typename FTransform >
static string NStr::TransformJoin (TIterator from, TIterator to, const CTempString &delim, FTransform fnTransform)
 
static string NStr::PrintableString (const CTempString str, TPrintableMode mode=fNewLine_Quote|fNonAscii_Passthru)
 Get a printable version of the specified string. More...
 
static string NStr::Escape (const CTempString str, const CTempString metacharacters, char escape_char='\\')
 Escape string (generic version). More...
 
static string NStr::Unescape (const CTempString str, char escape_char='\\')
 Unescape string (generic version). More...
 
static string NStr::Quote (const CTempString str, char quote_char='"', char escape_char = '\\')
 Quote string (generic version). More...
 
static string NStr::Unquote (const CTempString str, char escape_char='\\')
 Unquote string (generic version). More...
 
static string NStr::Sanitize (CTempString str, TSS_Flags flags=fSS_print)
 Sanitize a string, allowing only specified classes of characters. More...
 
static string NStr::Sanitize (CTempString str, CTempString allow_chars, CTempString reject_chars, char reject_replacement=' ', TSS_Flags flags=0)
 Sanitize a string, allowing only specified characters or character classes. More...
 
static string NStr::ParseEscapes (const CTempString str, EEscSeqRange mode=eEscSeqRange_Standard, char user_char='?')
 Parse C-style escape sequences in the specified string. More...
 
static string NStr::ParseQuoted (const CTempString str, size_t *n_read=NULL)
 Discard C-style backslash escapes and extract a quoted string. More...
 
static string NStr::CEncode (const CTempString str, EQuoted quoted=eQuoted)
 Encode a string for C/C++. More...
 
static string NStr::CParse (const CTempString str, EQuoted quoted=eQuoted)
 Discard C-style backslash escapes. More...
 
static string NStr::JavaScriptEncode (const CTempString str)
 Encode a string for JavaScript. More...
 
static string NStr::XmlEncode (const CTempString str, TXmlEncode flags=eXmlEnc_Contents)
 Encode a string for XML. More...
 
static string NStr::HtmlEncode (const CTempString str, THtmlEncode flags=fHtmlEnc_EncodeAll)
 Encode a string for HTML. More...
 
static string NStr::HtmlDecode (const CTempString str, EEncoding encoding=eEncoding_Unknown, THtmlDecode *result_flags=NULL)
 Decode HTML entities and character references. More...
 
static string NStr::HtmlEntity (TUnicodeSymbol uch)
 Returns HTML entity name for this symbol if one exists (without leading ampersand and trailing semicolon); or empty string if suitable HTML entity was not found. More...
 
static string NStr::JsonEncode (const CTempString str, EJsonEncode encoding=eJsonEnc_UTF8)
 Encode a string for JSON. More...
 
static string NStr::JsonDecode (const CTempString str, size_t *n_read=NULL)
 Decode a string encoded by JsonEncode. More...
 
static string NStr::ShellEncode (const string &str)
 Quotes a string in Bourne Again Shell (BASH) syntax, in a way that disallows non-printable characters in the result. More...
 
static string NStr::URLEncode (const CTempString str, EUrlEncode flag=eUrlEnc_SkipMarkChars)
 URL-encode string. More...
 
static CStringUTF8 NStr::SQLEncode (const CStringUTF8 &str, ESqlEncode flag)
 SQL-encode string. More...
 
static CStringUTF8 NStr::SQLEncode (const CStringUTF8 &str)
 
static string NStr::URLDecode (const CTempString str, EUrlDecode flag=eUrlDec_All)
 URL-decode string. More...
 
static void NStr::URLDecodeInPlace (string &str, EUrlDecode flag=eUrlDec_All)
 URL-decode string to itself. More...
 
static bool NStr::NeedsURLEncoding (const CTempString str, EUrlEncode flag=eUrlEnc_SkipMarkChars)
 Check if the string needs the requested URL-encoding. More...
 
static string NStr::Base64Encode (const CTempString str, size_t line_len=0)
 Base64-encode string. More...
 
static string NStr::Base64Decode (const CTempString str)
 Base64-decode string. More...
 
static bool NStr::IsIPAddress (const CTempStringEx str)
 Check if the string contains a valid IP address. More...
 
template<typename _D >
static void NStr::WrapIt (const string &str, SIZE_TYPE width, _D &dest, TWrapFlags flags=0, const string *prefix=0, const string *prefix1=0)
 Wrap the specified string into lines of a specified width. More...
 
virtual NStr::IWrapDest::~IWrapDest ()
 
virtual void NStr::IWrapDest::Append (const string &s)=0
 
virtual void NStr::IWrapDest::Append (const CTempString &s)=0
 
 NStr::CWrapDestStringList::CWrapDestStringList (list< string > &l)
 
virtual void NStr::CWrapDestStringList::Append (const string &s)
 
virtual void NStr::CWrapDestStringList::Append (const CTempString &s)
 
static void NStr::Wrap (const string &str, SIZE_TYPE width, IWrapDest &dest, TWrapFlags flags, const string *prefix, const string *prefix1)
 
static list< string > & NStr::Wrap (const string &str, SIZE_TYPE width, list< string > &arr, TWrapFlags flags=0, const string *prefix=0, const string *prefix1=0)
 
static list< string > & NStr::Wrap (const string &str, SIZE_TYPE width, list< string > &arr, TWrapFlags flags, const string &prefix, const string *prefix1=0)
 
static list< string > & NStr::Wrap (const string &str, SIZE_TYPE width, list< string > &arr, TWrapFlags flags, const string &prefix, const string &prefix1)
 
static list< string > & NStr::WrapList (const list< string > &l, SIZE_TYPE width, const string &delim, list< string > &arr, TWrapFlags flags=0, const string *prefix=0, const string *prefix1=0)
 Wrap the list using the specified criteria. More...
 
static list< string > & NStr::WrapList (const list< string > &l, SIZE_TYPE width, const string &delim, list< string > &arr, TWrapFlags flags, const string &prefix, const string *prefix1=0)
 
static list< string > & NStr::WrapList (const list< string > &l, SIZE_TYPE width, const string &delim, list< string > &arr, TWrapFlags flags, const string &prefix, const string &prefix1)
 
static list< string > & NStr::Justify (const CTempString str, SIZE_TYPE width, list< string > &par, const CTempString *pfx=0, const CTempString *pfx1=0)
 Justify the specified string into a series of lines of the same width. More...
 
static list< string > & NStr::Justify (const CTempString str, SIZE_TYPE width, list< string > &par, const CTempString pfx, const CTempString *pfx1=0)
 
static list< string > & NStr::Justify (const CTempString str, SIZE_TYPE width, list< string > &par, const CTempString pfx, const CTempString pfx1)
 
static string NStr::Dedent (const CTempString str, TDedentFlags flags=0)
 Dedent multi-line string, removing common whitespace prefix for each line. More...
 
static string NStr::DedentR (const CTempString str)
 
static string NStr::GetField (const CTempString str, size_t field_no, const CTempString delimiters, EMergeDelims merge=eNoMergeDelims)
 Search for a field. More...
 
static string NStr::GetField (const CTempString str, size_t field_no, char delimiter, EMergeDelims merge=eNoMergeDelims)
 Search for a field. More...
 
static CTempString NStr::GetField_Unsafe (const CTempString str, size_t field_no, const CTempString delimiters, EMergeDelims merge=eNoMergeDelims)
 Search for a field. More...
 
static CTempString NStr::GetField_Unsafe (const CTempString str, size_t field_no, char delimiter, EMergeDelims merge=eNoMergeDelims)
 Search for a field. More...
 
static bool NStr::x_ReportLimitsError (const CTempString str, TStringToNumFlags flags)
 
template<typename TNumeric , typename TSource >
static bool NStr::x_VerifyIntLimits (TSource v, const CTempString str, TStringToNumFlags flags)
 
template<typename TNumeric , typename TSource >
static bool NStr::x_VerifyFloatLimits (TSource v, const CTempString str, TStringToNumFlags flags)
 
template<typename TNumeric >
static enable_if< is_integral< TNumeric >::value &&is_signed< TNumeric >::value &&(sizeof(TNumeric)< sizeof(int)), TNumeric >::type NStr::x_StringToNumeric (const CTempString str, TStringToNumFlags flags, int base)
 
template<typename TNumeric >
static enable_if< is_integral< TNumeric >::value &&is_signed< TNumeric >::value &&(sizeof(TNumeric)< sizeof(int)), bool >::type NStr::x_StringToNumeric (const CTempString str, TNumeric *value, TStringToNumFlags flags, int base)
 
static bool NStr::x_StringToNumeric (const CTempString str, long *value, TStringToNumFlags flags, int base)
 
static bool NStr::x_StringToNumeric (const CTempString str, unsigned long *value, TStringToNumFlags flags, int base)
 
static bool NStr::x_StringToNumeric (const CTempString str, float *value, TStringToNumFlags flags, int)
 
static bool NStr::x_StringToNumeric (const CTempString str, double *value, TStringToNumFlags flags, int)
 
template<typename TStrictId >
static enable_if< is_integral< typename TStrictId::TId >::value &&is_member_function_pointer< decltype(&TStrictId::Get)>::value, bool >::type NStr::x_StringToNumeric (const CTempString str, TStrictId *value, TStringToNumFlags flags, int base)
 
template<typename TNumeric >
static enable_if< is_integral< TNumeric >::value &&is_signed< TNumeric >::value &&(sizeof(TNumeric)<=sizeof(int) &&!is_same< TNumeric, long >::value), void >::type NStr::x_NumericToString (string &out_str, TNumeric value, TNumToStringFlags flags, int base)
 
static void NStr::x_NumericToString (string &out_str, long value, TNumToStringFlags flags, int base)
 
static void NStr::x_NumericToString (string &out_str, unsigned long value, TNumToStringFlags flags, int base)
 
template<typename TStrictId >
static enable_if< is_integral< typename TStrictId::TId >::value &&is_member_function_pointer< decltype(&TStrictId::Get)>::value, void >::type NStr::x_NumericToString (string &out_str, TStrictId value, TNumToStringFlags flags, int base)
 
template<typename TIterator >
static string NStr::xx_Join (TIterator from, TIterator to, const CTempString &delim)
 
template<typename TIterator >
static enable_if< is_same< typename TIterator::iterator_category, input_iterator_tag >::value &&is_convertible< typename TIterator::value_type, string >::value, string >::type NStr::x_Join (TIterator from, TIterator to, const CTempString &delim)
 
template<typename TValue >
static enable_if< is_convertible< TValue, string >::value, string >::type NStr::x_Join (TValue *from, TValue *to, const CTempString &delim)
 
CNcbiOstreamoperator<< (CNcbiOstream &os, const TStringUCS2 &str)
 Operator for writing TStringUCS2 to stream. More...
 
static CStringUTF8 CUtf8::AsUTF8 (const CTempString &src, EEncoding encoding, EValidate validate=eNoValidate)
 Convert into UTF8 from a C/C++ string. More...
 
static CStringUTF8 CUtf8::AsUTF8 (const CTempString &src, const locale &lcl)
 Convert into UTF8 from a C/C++ string. More...
 
template<typename TChar >
static enable_if< is_integral< TChar >::value &&(1< sizeof(TChar)), CStringUTF8 >::type CUtf8::AsUTF8 (const basic_string< TChar > &src)
 Convert into UTF8 from a Unicode C++ string. More...
 
template<typename TChar >
static enable_if< is_integral< TChar >::value &&(1< sizeof(TChar)), CStringUTF8 >::type CUtf8::AsUTF8 (const TChar *src, SIZE_TYPE tchar_count=NCBI_NS_STD::string::npos)
 Convert into UTF8 from a Unicode character buffer. More...
 
template<typename TChar >
static enable_if< is_integral< TChar >::value &&(1< sizeof(TChar)), CStringUTF8 & >::type CUtf8::AppendAsUTF8 (CStringUTF8 &dest, const basic_string< TChar > &src)
 Convert Unicode C++ string into UTF8 and append it to existing string. More...
 
template<typename TChar >
static enable_if< is_integral< TChar >::value &&(1< sizeof(TChar)), CStringUTF8 & >::type CUtf8::AppendAsUTF8 (CStringUTF8 &dest, const TChar *src, SIZE_TYPE tchar_count=NCBI_NS_STD::string::npos)
 Convert Unicode character buffer into UTF8 and append it to existing string. More...
 
template<typename TChar >
static enable_if< is_integral< TChar >::value &&(1< sizeof(TChar)), CStringUTF8 & >::type CUtf8::AppendAsUTF8 (CStringUTF8 &dest, TChar ch)
 Convert Unicode symbol into UTF8 and append it to existing string. More...
 
static CStringUTF8CUtf8::AppendAsUTF8 (CStringUTF8 &dest, const CTempString &src, EEncoding encoding, EValidate validate=eNoValidate)
 Convert non-Unicode C++ string into UTF8 and append it to existing string. More...
 
static CStringUTF8CUtf8::AppendAsUTF8 (CStringUTF8 &dest, const CTempString &src, const locale &lcl)
 Convert non-Unicode C++ string into UTF8 and append it to existing string. More...
 
static CStringUTF8CUtf8::AppendAsUTF8 (CStringUTF8 &dest, char ch, EEncoding encoding, EValidate validate=eNoValidate)
 Convert non-Unicode character into UTF8 and append it to existing string. More...
 
static CStringUTF8CUtf8::AppendAsUTF8 (CStringUTF8 &dest, char ch, const locale &lcl)
 Convert non-Unicode character into UTF8 and append it to existing string. More...
 
static string CUtf8::AsSingleByteString (const CTempString &src, EEncoding encoding, const char *substitute_on_error=0, EValidate validate=eNoValidate)
 Convert UTF8 string into a single-byte character representation. More...
 
static string CUtf8::AsSingleByteString (const CTempString &src, const locale &lcl, const char *substitute_on_error=0, EValidate validate=eNoValidate)
 
template<typename TChar >
static enable_if< is_integral< TChar >::value &&(1< sizeof(TChar)), basic_string< TChar > >::type CUtf8::AsBasicString (const CTempString &src, const TChar *substitute_on_error, EValidate validate=eNoValidate)
 Convert UTF8 string into Unicode. More...
 
template<typename TChar >
static enable_if< is_integral< TChar >::value &&(1< sizeof(TChar)), basic_string< TChar > >::type CUtf8::AsBasicString (const CTempString &src)
 
static SIZE_TYPE CUtf8::GetSymbolCount (const CTempString &src)
 Get the number of symbols (code points) in UTF8 string. More...
 
static SIZE_TYPE CUtf8::GetValidSymbolCount (const CTempString &src)
 Get the number of valid UTF-8 symbols (code points) in buffer. More...
 
static SIZE_TYPE CUtf8::GetValidBytesCount (const CTempString &src)
 Get the number of valid UTF-8 bytes (code units) in buffer. More...
 
static SIZE_TYPE CUtf8::EvaluateSymbolLength (const CTempString &src)
 Check buffer for presence of UTF-8 byte sequence and return length of first symbol. More...
 
static bool CUtf8::EvaluateFirst (char ch, SIZE_TYPE &more)
 Check that the character is valid first byte of an UTF8 byte sequence. More...
 
static bool CUtf8::EvaluateNext (char ch)
 Check that the character is valid continuation byte of an UTF8 byte sequence. More...
 
static bool CUtf8::MatchEncoding (const CTempString &src, EEncoding encoding)
 Check the encoding of the C/C++ string. More...
 
static EEncoding CUtf8::GuessEncoding (const CTempString &src)
 Guess the encoding of the C/C++ string. More...
 
static string CUtf8::EncodingToString (EEncoding encoding)
 Give Encoding name as string. More...
 
static EEncoding CUtf8::StringToEncoding (const CTempString &encoding_name)
 Convert encoding name into EEncoding enum, taking into account synonyms as per http://www.iana.org/assignments/character-sets. More...
 
static TUnicodeSymbol CUtf8::CharToSymbol (char ch, EEncoding encoding)
 Convert encoded character into Unicode. More...
 
static TUnicodeSymbol CUtf8::CharToSymbol (char ch, const locale &lcl)
 Convert encoded character into Unicode. More...
 
static char CUtf8::SymbolToChar (TUnicodeSymbol sym, EEncoding encoding)
 Convert Unicode code point into encoded character. More...
 
static char CUtf8::SymbolToChar (TUnicodeSymbol sym, const locale &lcl)
 Convert Unicode code point into encoded character. More...
 
static bool CUtf8::IsWhiteSpace (TUnicodeSymbol sym)
 Determines if a symbol is whitespace per http://unicode.org/charts/uca/chart_Whitespace.html. More...
 
static CStringUTF8CUtf8::TruncateSpacesInPlace (CStringUTF8 &str, NStr::ETrunc side=NStr::eTrunc_Both)
 Truncate spaces in the string (in-place) More...
 
static CStringUTF8 CUtf8::TruncateSpaces (const CTempString &str, NStr::ETrunc side=NStr::eTrunc_Both)
 Truncate spaces in the string. More...
 
static CTempString CUtf8::TruncateSpaces_Unsafe (const CTempString &str, NStr::ETrunc side=NStr::eTrunc_Both)
 Truncate spaces in the string. More...
 
static TUnicodeSymbol CUtf8::Decode (const char *&src)
 Convert sequence of UTF8 code units into Unicode code point. More...
 
static TUnicodeSymbol CUtf8::Decode (string::const_iterator &src)
 Convert sequence of UTF8 code units into Unicode code point. More...
 
static TUnicodeSymbol CUtf8::DecodeFirst (char ch, SIZE_TYPE &more)
 Begin converting first character of UTF8 sequence into Unicode. More...
 
static TUnicodeSymbol CUtf8::DecodeNext (TUnicodeSymbol chU, char ch)
 Convert next character of UTF8 sequence into Unicode. More...
 
static void CUtf8::x_Validate (const CTempString &str)
 
static SIZE_TYPE CUtf8::x_GetValidSymbolCount (const CTempString &src, CTempString::const_iterator &err)
 
static CStringUTF8CUtf8::x_AppendChar (CStringUTF8 &u8str, TUnicodeSymbol ch)
 
static CStringUTF8CUtf8::x_Append (CStringUTF8 &u8str, const CTempString &src, EEncoding encoding, EValidate validate)
 
static CStringUTF8CUtf8::x_Append (CStringUTF8 &u8str, const CTempString &src, const locale &lcl)
 
template<typename TChar >
static bool CUtf8::x_TCharToUnicodeSymbol (TUnicodeSymbol &u, const TChar *src)
 
template<typename TChar >
static CStringUTF8CUtf8::x_Append (CStringUTF8 &u8str, const TChar *src, SIZE_TYPE tchar_count)
 
template<typename TChar >
static basic_string< TCharCUtf8::x_AsBasicString (const CTempString &src, const TChar *substitute_on_error, EValidate validate)
 
template<typename TIterator >
static TUnicodeSymbol CUtf8::x_Decode (TIterator &src)
 
static SIZE_TYPE CUtf8::x_BytesNeeded (TUnicodeSymbol ch)
 
static bool CUtf8::x_EvalFirst (char ch, SIZE_TYPE &more)
 
static bool CUtf8::x_EvalNext (char ch)
 
static CTempString CUtf8::x_GetErrorFragment (const CTempString &src)
 
virtual const char * CParseTemplException< TBase >::GetErrCodeString (void) const override
 Translate from the error code value to its string representation. More...
 
 CParseTemplException< TBase >::CParseTemplException (const CDiagCompileInfo &info, const CException *prev_exception, EErrCode err_code, const string &message, string::size_type pos, EDiagSev severity=eDiag_Error)
 Constructor. More...
 
 CParseTemplException< TBase >::CParseTemplException (const CParseTemplException< TBase > &other)
 Constructor. More...
 
virtual CParseTemplException< TBase >::~CParseTemplException (void) noexcept
 Destructor. More...
 
virtual void CParseTemplException< TBase >::ReportExtra (ostream &out) const override
 Report error position. More...
 
virtual const char * CParseTemplException< TBase >::GetType (void) const override
 Get exception class type. More...
 
TErrCode CParseTemplException< TBase >::GetErrCode (void) const
 Get error code. More...
 
string::size_type CParseTemplException< TBase >::GetPos (void) const noexcept
 Get error position. More...
 
 CParseTemplException< TBase >::CParseTemplException (const CDiagCompileInfo &info, const CException *prev_exception, const string &message, string::size_type pos, EDiagSev severity, CException::TFlags flags)
 
 CParseTemplException< TBase >::CParseTemplException (void)
 Constructor. More...
 
virtual const CExceptionCParseTemplException< TBase >::x_Clone (void) const override
 Helper clone method. More...
 
virtual const char * CStringException::GetErrCodeString (void) const override
 Translate from the error code value to its string representation. More...
 
 CStringException::NCBI_EXCEPTION_DEFAULT2 (CStringException, CParseTemplException< CCoreException >, std::string::size_type)
 
virtual string IStringDecoder::Decode (const CTempString src, EStringType stype) const =0
 Decode the string. More...
 
virtual IStringDecoder::~IStringDecoder (void)
 
virtual string IStringEncoder::Encode (const CTempString src, EStringType stype) const =0
 Encode the string. More...
 
virtual IStringEncoder::~IStringEncoder (void)
 
 CStringDecoder_Url::CStringDecoder_Url (NStr::EUrlDecode flag=NStr::eUrlDec_All)
 
virtual string CStringDecoder_Url::Decode (const CTempString src, EStringType stype) const
 
 CStringEncoder_Url::CStringEncoder_Url (NStr::EUrlEncode flag=NStr::eUrlEnc_SkipMarkChars)
 
virtual string CStringEncoder_Url::Encode (const CTempString src, EStringType stype) const
 
 CStringPairs< TContainer >::CStringPairs (IStringDecoder *decoder=NULL, EOwnership own_decoder=eTakeOwnership, IStringEncoder *encoder=NULL, EOwnership own_encoder=eTakeOwnership)
 Create parser with the specified decoder/encoder and default separators. More...
 
 CStringPairs< TContainer >::CStringPairs (const CTempString arg_sep, const CTempString val_sep, IStringDecoder *decoder=NULL, EOwnership own_decoder=eTakeOwnership, IStringEncoder *encoder=NULL, EOwnership own_encoder=eTakeOwnership)
 Create parser with the specified parameters. More...
 
 CStringPairs< TContainer >::CStringPairs (NStr::EUrlDecode decode_flag, NStr::EUrlEncode encode_flag)
 Create parser with the selected URL-encoding/decoding options and default separators. More...
 
virtual CStringPairs< TContainer >::~CStringPairs (void)
 
void CStringPairs< TContainer >::SetDecoder (IStringDecoder *decoder, EOwnership own=eTakeOwnership)
 Set string decoder. More...
 
IStringDecoderCStringPairs< TContainer >::GetDecoder (void)
 Get decoder or NULL. Does not affect decoder ownership. More...
 
void CStringPairs< TContainer >::SetEncoder (IStringEncoder *encoder, EOwnership own=eTakeOwnership)
 Set string encoder. More...
 
IStringEncoderCStringPairs< TContainer >::GetEncoder (void)
 Get encoder or NULL. Does not affect encoder ownership. More...
 
void CStringPairs< TContainer >::Parse (const CTempString str, NStr::EMergeDelims merge_argsep=NStr::eMergeDelims)
 Parse the string. More...
 
static void CStringPairs< TContainer >::Parse (TStrPairs &pairs, const CTempString str, const CTempString arg_sep, const CTempString val_sep, IStringDecoder *decoder=NULL, EOwnership own=eTakeOwnership, NStr::EMergeDelims merge_argsep=NStr::eMergeDelims)
 Parse the string using the provided decoder, put data into the container. More...
 
string CStringPairs< TContainer >::Merge (void) const
 Merge name-value pairs into a single string using the currently set separators and the provided encoder if any. More...
 
static string CStringPairs< TContainer >::Merge (const TStrPairs &pairs, const string &arg_sep, const string &val_sep, IStringEncoder *encoder=NULL, EOwnership own=eTakeOwnership)
 Merge name-value pairs from the provided container, separators and encoder. More...
 
const TStrPairsCStringPairs< TContainer >::GetPairs (void) const
 Read data. More...
 
TStrPairsCStringPairs< TContainer >::GetPairs (void)
 Get non-const data. More...
 
 CEncodedString::CEncodedString (void)
 
 CEncodedString::CEncodedString (const CTempString s, NStr::EUrlEncode flag=NStr::eUrlEnc_SkipMarkChars)
 
void CEncodedString::SetString (const CTempString s, NStr::EUrlEncode flag=NStr::eUrlEnc_SkipMarkChars)
 Set new original string. More...
 
bool CEncodedString::IsEncoded (void) const
 Check if the original string was encoded. More...
 
const stringCEncodedString::GetOriginalString (void) const
 Get the original unencoded string. More...
 
const stringCEncodedString::GetEncodedString (void) const
 Get encoded string. More...
 
bool CEncodedString::IsEmpty (void) const
 Check if the string is empty. More...
 
int PCase_Generic< T >::Compare (const T &s1, const T &s2) const
 Return difference between "s1" and "s2". More...
 
bool PCase_Generic< T >::Less (const T &s1, const T &s2) const
 Return TRUE if s1 < s2. More...
 
bool PCase_Generic< T >::Equals (const T &s1, const T &s2) const
 Return TRUE if s1 == s2. More...
 
bool PCase_Generic< T >::operator() (const T &s1, const T &s2) const
 Return TRUE if s1 < s2. More...
 
int PNocase_Generic< T >::Compare (const T &s1, const T &s2) const
 Return difference between "s1" and "s2". More...
 
bool PNocase_Generic< T >::Less (const T &s1, const T &s2) const
 Return TRUE if s1 < s2. More...
 
bool PNocase_Generic< T >::Equals (const T &s1, const T &s2) const
 Return TRUE if s1 == s2. More...
 
bool PNocase_Generic< T >::operator() (const T &s1, const T &s2) const
 Return TRUE if s1 < s2 ignoring case. More...
 
 PNocase_Conditional_Generic< T >::PNocase_Conditional_Generic (NStr::ECase case_sens=NStr::eCase)
 Construction. More...
 
NStr::ECase PNocase_Conditional_Generic< T >::GetCase () const
 Get comparison type. More...
 
void PNocase_Conditional_Generic< T >::SetCase (NStr::ECase case_sens)
 Set comparison type. More...
 
int PNocase_Conditional_Generic< T >::Compare (const T &s1, const T &s2) const
 Return difference between "s1" and "s2". More...
 
bool PNocase_Conditional_Generic< T >::Less (const T &s1, const T &s2) const
 Return TRUE if s1 < s2. More...
 
bool PNocase_Conditional_Generic< T >::Equals (const T &s1, const T &s2) const
 Return TRUE if s1 == s2. More...
 
bool PNocase_Conditional_Generic< T >::operator() (const T &s1, const T &s2) const
 Return TRUE if s1 < s2 ignoring case. More...
 
bool PEqualNocase_Generic< T >::operator() (const T &s1, const T &s2) const
 Return TRUE if s1 < s2 ignoring case. More...
 
 PEqualNocase_Conditional_Generic< T >::PEqualNocase_Conditional_Generic (NStr::ECase case_sens=NStr::eCase)
 Construction. More...
 
bool PEqualNocase_Conditional_Generic< T >::operator() (const T &s1, const T &s2) const
 Return TRUE if s1 < s2 ignoring case. More...
 
bool PQuickStringLess::operator() (const CTempString s1, const CTempString s2) const
 
template<class Arg1 , class Arg2 , class Pred >
bool AStrEquiv (const Arg1 &x, const Arg2 &y, Pred pr)
 Check equivalence of arguments using predicate. More...
 
void CStrDummyTokenPos::push_back (string::size_type)
 
void CStrDummyTokenPos::reserve (string::size_type)
 
static size_t CStrDummyTokenCount::Count (CStrTokenizeBase &)
 
static void CStrDummyTargetReserve< TV, TP >::Reserve (CStrTokenizeBase &, TV &, TP &)
 
 CTempStringList::CTempStringList (CTempString_Storage *storage)
 
void CTempStringList::Add (const CTempString &s)
 
void CTempStringList::Clear (void)
 
void CTempStringList::Join (string *s) const
 
void CTempStringList::Join (CTempString *s) const
 
void CTempStringList::Join (CTempStringEx *s) const
 
size_t CTempStringList::GetSize (void) const
 
 CTempStringList::SNode::SNode ()
 
 CTempStringList::SNode::SNode (const CTempString &s)
 
 CStrTokenizeBase::CStrTokenizeBase (const CTempString &str, const CTempString &delim, TFlags flags, CTempString_Storage *storage)
 
SIZE_TYPE CStrTokenizeBase::GetPos (void) const
 
bool CStrTokenizeBase::AtEnd (void) const
 
bool CStrTokenizeBase::Advance (CTempStringList *part_collector)
 Return TRUE if it found some text and put it into collector. More...
 
bool CStrTokenizeBase::Advance (CTempStringList *part_collector, SIZE_TYPE *ptr_part_start, SIZE_TYPE *ptr_delim_pos)
 
void CStrTokenizeBase::SkipDelims (void)
 Skip all delimiters starting from current position. More...
 
void CStrTokenizeBase::MergeDelims (void)
 Assumes that we already have a delimiter on the previous position, so just skip all subsequent, depending on flags. More...
 
void CStrTokenizeBase::SetDelim (const CTempString &delim)
 
void CStrTokenizeBase::x_ExtendInternalDelim ()
 
void CStrTokenizeBase::x_SkipDelims (bool force_skip)
 
 CStrTokenize< TStr, TV, TP, TCount, TReserve >::CStrTokenize (const TString &str, const TString &delim, TFlags flags, CTempString_Storage *storage)
 Constructor. More...
 
void CStrTokenize< TStr, TV, TP, TCount, TReserve >::Do (TContainer &target, TPosContainer &token_pos, const TString &empty_str=TString())
 Tokenize the string using the specified set of char delimiters. More...
 
static size_t CStringTokenCount::Count (CStrTokenizeBase &tokenizer)
 
static void CStrTargetReserve< TV, TP, TCount >::Reserve (CStrTokenizeBase &tokenizer, TV &target, TP &token_pos)
 
 CStrTokenPosAdapter< TPosContainer >::CStrTokenPosAdapter (TPosContainer *token_pos)
 If token_pos construction parameter is NULL all calls are ignored. More...
 
void CStrTokenPosAdapter< TPosContainer >::push_back (string::size_type pos)
 
void CStrTokenPosAdapter< TPosContainer >::reserve (string::size_type capacity)
 
string::size_type CStrTokenPosAdapter< TPosContainer >::size ()
 
void CStrTokenPosAdapter< TPosContainer >::resize (string::size_type newsize)
 
 CTempString::CTempString (void)
 
 CTempString::CTempString (const char *str)
 
 CTempString::CTempString (const char *str, size_type len)
 
 CTempString::CTempString (const char *str, size_type pos, size_type len)
 Use CTempString(const char* str + pos, size_type len - pos) instead. More...
 
 CTempString::CTempString (const string &str)
 
 CTempString::CTempString (const string &str, size_type len)
 Use CTempString(const string& str, 0, size_type len) instead. More...
 
 CTempString::CTempString (const string &str, size_type pos, size_type len)
 
 CTempString::CTempString (const CTempString &str)
 
 CTempString::CTempString (const CTempString &str, size_type pos)
 
 CTempString::CTempString (const CTempString &str, size_type pos, size_type len)
 
void CTempString::Copy (string &dst, size_type pos, size_type len) const
 Copy a substring into a string Somewhat similar to basic_string::assign() More...
 
 CTempString::operator string (void) const
 
void CTempString::x_Init (const char *str, size_type str_len, size_type pos, size_type len)
 
void CTempString::x_Init (const char *str, size_type str_len, size_type pos)
 
string g_CTempString_plus (const char *str1, size_t len1, const char *str2, size_t len2)
 
string operator+ (const char *str1, const CTempString str2)
 
string operator+ (const CTempString str1, const char *str2)
 
string operator+ (const string &str1, const CTempString str2)
 
string operator+ (const CTempString str1, const string &str2)
 
string operator+ (const CTempString str1, const CTempString str2)
 
CNcbiOstreamoperator<< (CNcbiOstream &out, const CTempString str)
 
template<size_t Size>
CTempString literal (const char(&str)[Size])
 Templatized initialization from a string literal. More...
 
bool operator== (const char *str1, const CTempString str2)
 
bool operator== (const string &str1, const CTempString str2)
 
bool operator!= (const char *str1, const CTempString str2)
 
bool operator!= (const string &str1, const CTempString str2)
 
bool operator< (const char *str1, const CTempString str2)
 
bool operator< (const string &str1, const CTempString str2)
 
bool operator> (const char *str1, const CTempString str2)
 
bool operator> (const string &str1, const CTempString str2)
 
 CTempStringEx::CTempStringEx (void)
 
 CTempStringEx::CTempStringEx (const char *str)
 
 CTempStringEx::CTempStringEx (const char *str, size_type len)
 
 CTempStringEx::CTempStringEx (const char *str, size_type len, EZeroAtEnd zero_at_end)
 
 CTempStringEx::CTempStringEx (const string &str)
 
 CTempStringEx::CTempStringEx (const string &str, size_type pos, size_type len)
 
 CTempStringEx::CTempStringEx (const CTempString &str)
 
 CTempStringEx::CTempStringEx (const CTempString &str, size_type pos)
 
 CTempStringEx::CTempStringEx (const CTempString &str, size_type pos, size_type len)
 
CTempStringExCTempStringEx::assign (const char *str, size_type len)
 Assign new values to the content of the a string. More...
 
CTempStringExCTempStringEx::assign (const char *str, size_type len, EZeroAtEnd zero_at_end)
 
CTempStringExCTempStringEx::assign (const CTempString &str)
 
CTempStringExCTempStringEx::assign (const CTempStringEx &str)
 
CTempStringExCTempStringEx::assign (const CTempString str, size_type pos, size_type count)
 
void CTempStringEx::clear (void)
 Clear value to an empty string. More...
 
CTempStringEx CTempStringEx::substr (size_type pos) const
 Obtain a substring from this string, beginning at a given offset. More...
 
CTempStringEx CTempStringEx::substr (size_type pos, size_type len) const
 Obtain a substring from this string, beginning at a given offset and extending a specified length. More...
 
bool CTempStringEx::HasZeroAtEnd (void) const
 
 CTempString_Storage::CTempString_Storage (void)
 
 CTempString_Storage::~CTempString_Storage (void)
 
char * CTempString_Storage::Allocate (CTempString::size_type len)
 
 CTextJoiner< num_prealloc, TIn, TOut >::CTextJoiner ()
 
CTextJoinerCTextJoiner< num_prealloc, TIn, TOut >::Add (const TIn &s)
 
void CTextJoiner< num_prealloc, TIn, TOut >::Join (TOut *result) const
 

Variables

const _TChar * CTempXStr< _TChar >::m_Data
 
size_t CTempXStr< _TChar >::m_Length
 
const char *const kEmptyCStr
 Empty "C" string (points to a '\0'). More...
 
const wchar_t *const kEmptyWCStr
 
list< string > & NStr::CWrapDestStringList::m_list
 
string::size_type CParseTemplException< TBase >::m_Pos
 Error position. More...
 
NStr::EUrlDecode CStringDecoder_Url::m_Flag
 
NStr::EUrlEncode CStringEncoder_Url::m_Flag
 
string CStringPairs< TContainer >::m_ArgSep
 
string CStringPairs< TContainer >::m_ValSep
 
AutoPtr< IStringDecoderCStringPairs< TContainer >::m_Decoder
 
AutoPtr< IStringEncoderCStringPairs< TContainer >::m_Encoder
 
TStrPairs CStringPairs< TContainer >::m_Data
 
string CEncodedString::m_Original
 
unique_ptr< stringCEncodedString::m_Encoded
 
NStr::ECase PNocase_Conditional_Generic< T >::m_CaseSensitive
 case sensitive when TRUE More...
 
 END_NCBI_NAMESPACE
 
CTempString CTempStringList::SNode::str
 
unique_ptr< SNodeCTempStringList::SNode::next
 
SNode CTempStringList::m_FirstNode
 
SNodeCTempStringList::m_LastNode
 
CTempString_StorageCTempStringList::m_Storage
 
const CTempStringCStrTokenizeBase::m_Str
 
CTempString CStrTokenizeBase::m_Delim
 
SIZE_TYPE CStrTokenizeBase::m_Pos
 
TFlags CStrTokenizeBase::m_Flags
 
CTempString_StorageCStrTokenizeBase::m_Storage
 
CTempStringEx CStrTokenizeBase::m_InternalDelim
 
CTempString_Storage CStrTokenizeBase::m_DelimStorage
 
TPosContainer * CStrTokenPosAdapter< TPosContainer >::m_TokenPos
 
const char * CTempString::m_String
 Stored pointer to string. More...
 
size_type CTempString::m_Length
 Length of string. More...
 
EZeroAtEnd CTempStringEx::m_ZeroAtEnd
 
TData CTempString_Storage::m_Data
 
TIn CTextJoiner< num_prealloc, TIn, TOut >::m_MainStorage [num_prealloc]
 
unique_ptr< vector< TIn > > CTextJoiner< num_prealloc, TIn, TOut >::m_ExtraStorage
 
size_t CTextJoiner< num_prealloc, TIn, TOut >::m_MainStorageUsage
 

Friends

class CUtf8::CStringUTF8_DEPRECATED
 

std::basic_string<> compatibility typedefs and enums

typedef char CTempString::value_type
 
typedef size_t CTempString::size_type
 
typedef const char * CTempString::const_iterator
 
static const size_type CTempString::npos = static_cast<size_type>(-1)
 

std::basic_string<> compatibility interface

CTempStringCTempString::assign (const char *src_str, size_type len)
 Assign new values to the content of the a string. More...
 
CTempStringCTempString::assign (const CTempString src_str)
 
CTempStringCTempString::assign (const CTempString src_str, size_type pos, size_type len)
 
CTempStringCTempString::operator= (const CTempString str)
 
const_iterator CTempString::begin () const
 Return an iterator to the string's starting position. More...
 
const_iterator CTempString::end () const
 Return an iterator to the string's ending position (one past the end of the represented sequence) More...
 
const char * CTempString::data (void) const
 Return a pointer to the array represented. More...
 
size_type CTempString::length (void) const
 Return the length of the represented array. More...
 
size_type CTempString::size (void) const
 Return the length of the represented array. More...
 
bool CTempString::empty (void) const
 Return true if the represented string is empty (i.e., the length is zero) More...
 
void CTempString::clear (void)
 Clears the string. More...
 
void CTempString::erase (size_type pos=0)
 Truncate the string at some specified position Note: basic_string<> supports additional erase() options that we do not provide here. More...
 
size_type CTempString::find (const CTempString match, size_type pos=0) const
 Find the first instance of the entire matching string within the current string, beginning at an optional offset. More...
 
size_type CTempString::find (char match, size_type pos=0) const
 Find the first instance of a given character string within the current string in a forward direction, beginning at an optional offset. More...
 
size_type CTempString::rfind (const CTempString match, size_type pos=npos) const
 Find the first instance of the entire matching string within the current string in a backward direction, beginning at an optional offset. More...
 
size_type CTempString::rfind (char match, size_type pos=npos) const
 Find the last instance of a given character string within the current string, beginning at an optional offset. More...
 
size_type CTempString::find_first_of (const CTempString match, size_type pos=0) const
 Find the first occurrence of any character in the matching string within the current string, beginning at an optional offset. More...
 
size_type CTempString::find_first_not_of (const CTempString match, size_type pos=0) const
 Find the first occurrence of any character not in the matching string within the current string, beginning at an optional offset. More...
 
size_type CTempString::find_last_of (const CTempString match, size_type pos=npos) const
 Find the last occurrence of any character in the matching string within the current string, beginning at an optional offset. More...
 
size_type CTempString::find_last_not_of (const CTempString match, size_type pos=npos) const
 Find the last occurrence of any character not in the matching string within the current string, beginning at an optional offset. More...
 
CTempString CTempString::substr (size_type pos) const
 Obtain a substring from this string, beginning at a given offset. More...
 
CTempString CTempString::substr (size_type pos, size_type len) const
 Obtain a substring from this string, beginning at a given offset and extending a specified length. More...
 
char CTempString::operator[] (size_type pos) const
 Index into the current string and provide its character in a read- only fashion. More...
 
int CTempString::compare (const CTempString str) const
 Compare the current string with a given string. More...
 
bool CTempString::operator== (const CTempString str) const
 
bool CTempString::operator!= (const CTempString str) const
 
bool CTempString::operator< (const CTempString str) const
 
bool CTempString::operator> (const CTempString str) const
 

Detailed Description

Macro Definition Documentation

◆ _T_CSTRING

#define _T_CSTRING (   x)    (x)

Definition at line 182 of file ncbistr.hpp.

◆ _T_STDSTRING

#define _T_STDSTRING (   x)    (x)

Definition at line 180 of file ncbistr.hpp.

◆ _T_XCSTRING

#define _T_XCSTRING (   x)    ncbi::impl_ToCString(x)

Definition at line 181 of file ncbistr.hpp.

◆ _T_XSTRING

#define _T_XSTRING (   x)    (x)

Definition at line 179 of file ncbistr.hpp.

◆ _TX

#define _TX (   x)    x

Definition at line 176 of file ncbistr.hpp.

◆ kEmptyStr

#define kEmptyStr   NcbiEmptyString

◆ kEmptyWStr

#define kEmptyWStr   NcbiEmptyWString

Definition at line 127 of file ncbistr.hpp.

◆ kEmptyXCStr

#define kEmptyXCStr   kEmptyCStr

Definition at line 187 of file ncbistr.hpp.

◆ kEmptyXStr

#define kEmptyXStr   kEmptyStr

Definition at line 186 of file ncbistr.hpp.

◆ NCBI_TEMPSTR_DESTROY_COPY

#define NCBI_TEMPSTR_DESTROY_COPY ( )

Definition at line 294 of file tempstr.hpp.

◆ NCBI_TEMPSTR_MAKE_COPY

#define NCBI_TEMPSTR_MAKE_COPY ( )

Definition at line 293 of file tempstr.hpp.

◆ NCBI_TEXT

#define NCBI_TEXT (   x)    x

Definition at line 55 of file ncbi_xstr.hpp.

◆ NcbiEmptyCStr

#define NcbiEmptyCStr   NCBI_NS_NCBI::kEmptyCStr

Definition at line 59 of file ncbistr.hpp.

◆ NcbiEmptyString

#define NcbiEmptyString   NCBI_NS_NCBI::CNcbiEmptyString::Get()

◆ NcbiEmptyWCStr

#define NcbiEmptyWCStr   NCBI_NS_NCBI::kEmptyWCStr

Definition at line 63 of file ncbistr.hpp.

◆ NcbiEmptyWString

#define NcbiEmptyWString   NCBI_NS_NCBI::CNcbiEmptyWString::Get()

Definition at line 126 of file ncbistr.hpp.

◆ NcbiEmptyXCStr

#define NcbiEmptyXCStr   NcbiEmptyCStr

Definition at line 184 of file ncbistr.hpp.

◆ NcbiEmptyXString

#define NcbiEmptyXString   NcbiEmptyString

Definition at line 185 of file ncbistr.hpp.

◆ NCBITOOLKIT_USE_LONG_UCS4

#define NCBITOOLKIT_USE_LONG_UCS4   (SIZEOF_LONG == 4)

Definition at line 3835 of file ncbistr.hpp.

◆ NPOS

#define NPOS   NCBI_NS_STD::string::npos

Typedef Documentation

◆ const_iterator

Definition at line 71 of file tempstr.hpp.

◆ CStringPairsParser

◆ EConvErrFlags

Formerly split out.

Definition at line 310 of file ncbistr.hpp.

◆ PCase

◆ PCase_CStr

typedef PCase_Generic<const char *> PCase_CStr

◆ PEqualNocase

◆ PEqualNocase_Conditional

◆ PEqualNocase_Conditional_CStr

◆ PEqualNocase_CStr

◆ PNocase

◆ PNocase_Conditional

◆ PNocase_Conditional_CStr

◆ PNocase_CStr

◆ SIZE_TYPE

typedef NCBI_NS_STD::string::size_type SIZE_TYPE

◆ size_type [1/2]

typedef size_t CTempString::size_type

Definition at line 70 of file tempstr.hpp.

◆ size_type [2/2]

Definition at line 1053 of file tempstr.hpp.

◆ TBuffer

typedef char* CTempString_Storage::TBuffer
private

Definition at line 1061 of file tempstr.hpp.

◆ TCharUCS2

typedef Uint2 TCharUCS2

Type for character in UCS-2 encoding.

Examples
/home/coremake/doxygen/cxx/include/corelib/ncbistr.hpp.

Definition at line 3847 of file ncbistr.hpp.

◆ TCharUCS4

◆ TContainer

template<class TStr , class TV , class TP = CStrDummyTokenPos, class TCount = CStrDummyTokenCount, class TReserve = CStrDummyTargetReserve<TV, TP>>
typedef TV CStrTokenize< TStr, TV, TP, TCount, TReserve >::TContainer

Definition at line 230 of file ncbistr_util.hpp.

◆ TConvErrFlags

Formerly split out.

Definition at line 312 of file ncbistr.hpp.

◆ TCountTrait

template<class TStr , class TV , class TP = CStrDummyTokenPos, class TCount = CStrDummyTokenCount, class TReserve = CStrDummyTargetReserve<TV, TP>>
typedef TCount CStrTokenize< TStr, TV, TP, TCount, TReserve >::TCountTrait

Definition at line 232 of file ncbistr_util.hpp.

◆ TData

typedef list<TBuffer> CTempString_Storage::TData
private

Definition at line 1062 of file tempstr.hpp.

◆ TDedentFlags

Bitwise OR of EDedentFlags.

Definition at line 3415 of file ncbistr.hpp.

◆ TErrCode

template<class TBase >
typedef int CParseTemplException< TBase >::TErrCode

◆ TFlags

Definition at line 142 of file ncbistr_util.hpp.

◆ THtmlDecode

Definition at line 3071 of file ncbistr.hpp.

◆ THtmlEncode

Definition at line 3055 of file ncbistr.hpp.

◆ TNumToStringFlags

Bitwise OR of "ENumToStringFlags".

Definition at line 266 of file ncbistr.hpp.

◆ TPosContainer

template<class TStr , class TV , class TP = CStrDummyTokenPos, class TCount = CStrDummyTokenCount, class TReserve = CStrDummyTargetReserve<TV, TP>>
typedef TP CStrTokenize< TStr, TV, TP, TCount, TReserve >::TPosContainer

Definition at line 231 of file ncbistr_util.hpp.

◆ TPrintableMode

Bitwise OR of EPrintableMode flags.

Definition at line 2736 of file ncbistr.hpp.

◆ TReserveTrait

template<class TStr , class TV , class TP = CStrDummyTokenPos, class TCount = CStrDummyTokenCount, class TReserve = CStrDummyTargetReserve<TV, TP>>
typedef TReserve CStrTokenize< TStr, TV, TP, TCount, TReserve >::TReserveTrait

Definition at line 233 of file ncbistr_util.hpp.

◆ TSplitFlags

Bitwise OR of ESplitFlags.

Definition at line 2510 of file ncbistr.hpp.

◆ TSS_Flags

Bitwise OR of ESS_Flags.

Definition at line 2853 of file ncbistr.hpp.

◆ TString

template<class TStr , class TV , class TP = CStrDummyTokenPos, class TCount = CStrDummyTokenCount, class TReserve = CStrDummyTargetReserve<TV, TP>>
typedef TStr CStrTokenize< TStr, TV, TP, TCount, TReserve >::TString

Definition at line 229 of file ncbistr_util.hpp.

◆ TStringPairsVector

typedef vector<pair<string, string> > TStringPairsVector

◆ TStringToNumFlags

Bitwise OR of "EStringToNumFlags".

Definition at line 311 of file ncbistr.hpp.

◆ TStringUCS2

typedef basic_string<TCharUCS2> TStringUCS2

Type for string in UCS-2 encoding.

Examples
/home/coremake/doxygen/cxx/include/corelib/ncbistr.hpp.

Definition at line 3849 of file ncbistr.hpp.

◆ TStringUCS4

◆ TStringUnicode

typedef basic_string<TUnicodeSymbol> TStringUnicode

Unicode string.

Examples
/home/coremake/doxygen/cxx/include/corelib/ncbistr.hpp.

Definition at line 143 of file ncbistr.hpp.

◆ TStrPair

template<class TContainer >
typedef TContainer::value_type CStringPairs< TContainer >::TStrPair

The container's value type must be pair<string, string> or a compatible type.

Examples
/home/coremake/doxygen/cxx/include/corelib/ncbistr.hpp.

Definition at line 4599 of file ncbistr.hpp.

◆ TStrPairs

template<class TContainer >
typedef TContainer CStringPairs< TContainer >::TStrPairs

◆ TUnicodeSymbol

Unicode character.

Examples
/home/coremake/doxygen/cxx/include/corelib/ncbistr.hpp.

Definition at line 141 of file ncbistr.hpp.

◆ TWrapFlags

Bitwise OR of "EWrapFlags".

Definition at line 3232 of file ncbistr.hpp.

◆ TXChar

typedef char TXChar

◆ TXmlEncode

Definition at line 3037 of file ncbistr.hpp.

◆ TXString

typedef string TXString

◆ value_type

Definition at line 69 of file tempstr.hpp.

Enumeration Type Documentation

◆ ECase [1/2]

Enumerator
eCase 

Case sensitive compare.

eNocase 

Case insensitive compare.

Definition at line 222 of file ncbi_xstr.hpp.

◆ ECase [2/2]

Which type of string comparison.

Enumerator
eCase 

Case sensitive compare.

eNocase 

Case insensitive compare.

Definition at line 1204 of file ncbistr.hpp.

◆ EDedentFlags

Flags for Dedent() method.

Enumerator
fDedent_NormalizeEmptyLines 

Each line containing only whitespaces will be normalized to a single newline character in the output.

Such lines are excluded from detecting common whitespace prefix.

fDedent_SkipFirstLine 

Ignore first line and skip it from the result.

fDedent_SkipEmptyFirstLine 

Ignore first line and skip it from the result, if it is empty only.

Definition at line 3407 of file ncbistr.hpp.

◆ EDirection

Search direction for Find() methods.

Enumerator
eForwardSearch 

Search in a forward direction.

eReverseSearch 

Search in a backward direction.

Definition at line 1945 of file ncbistr.hpp.

◆ EEncoding

enum EEncoding
Enumerator
eEncoding_Unknown 
eEncoding_UTF8 
eEncoding_Ascii 
eEncoding_ISO8859_1 

Note: From the point of view of the C++.

Toolkit, the ISO 8859-1 character set includes symbols 0x00 through 0xFF except 0x80 through 0x9F.

eEncoding_Windows_1252 
eEncoding_CESU8 

Definition at line 199 of file ncbistr.hpp.

◆ EErrCode [1/2]

template<class TBase >
enum CParseTemplException::EErrCode

Error types that for exception class.

Enumerator
eErr 

Generic error.

Examples
/home/coremake/doxygen/cxx/include/corelib/ncbistr.hpp.

Definition at line 4400 of file ncbistr.hpp.

◆ EErrCode [2/2]

Error types that string classes can generate.

Enumerator
eConvert 

Failure to convert string.

eBadArgs 

Bad arguments to string methods.

eFormat 

Wrong format for any input to string methods.

Definition at line 4509 of file ncbistr.hpp.

◆ EEscSeqRange

C-style escape sequences parsing mode.

For escape sequences with a value outside the range of [0-255] the behavior of ParseEscapes() depends from this mode. By default all escape sequences within a out or range will be converted to the least significant byte, with no warning.

Enumerator
eEscSeqRange_Standard 

Set char to the last (least significant byte) of the escape sequence (default).

eEscSeqRange_FirstByte 

Set char to the first byte of the escape sequence.

eEscSeqRange_Throw 

Throw an exception.

eEscSeqRange_Errno 

Set errno to ERANGE, return empty string.

eEscSeqRange_User 

Set char to the user value passed in another parameter.

Definition at line 2938 of file ncbistr.hpp.

◆ EHtmlDecode

HTML-decode flags.

Enumerator
fHtmlDec_CharRef_Entity 

Character entity reference(s) was found.

fHtmlDec_CharRef_Numeric 

Numeric character reference(s) was found.

fHtmlDec_Encoding_Changed 

Character encoding changed.

Definition at line 3066 of file ncbistr.hpp.

◆ EHtmlEncode

HTML-decode flags.

Enumerator
fHtmlEnc_EncodeAll 

Encode all symbols.

fHtmlEnc_SkipLiteralEntities 

Skip "&entity;".

fHtmlEnc_SkipNumericEntities 

Skip "&#NNNN;".

fHtmlEnc_SkipEntities 
fHtmlEnc_CheckPreencoded 

Print warning if some pre-encoded entity found in the string.

Definition at line 3047 of file ncbistr.hpp.

◆ EJsonEncode

Json-encode flags.

Enumerator
eJsonEnc_UTF8 

Encode all characters above 0x80 to \uXXXX form.

https://tools.ietf.org/html/rfc7159#section-8.1

eJsonEnc_Quoted 

Quote resulting string.

Keep all Unicode symbols as is. https://tools.ietf.org/html/rfc7159#section-7

Definition at line 3091 of file ncbistr.hpp.

◆ EMergeDelims

Whether to merge adjacent delimiters.

Used by some methods that don't need full functionality of ESplitFlags.

Enumerator
eMergeDelims 
eNoMergeDelims 

Definition at line 2514 of file ncbistr.hpp.

◆ ENcbiStrings

Enumerator
eNcbiStrings_Stat 
eNcbiStrings_PHID 

Definition at line 54 of file ncbi_strings.h.

◆ ENumToStringFlags

Number to string conversion flags.

NOTE: If specified base in the *ToString() methods is not default 10, that some flags like fWithSign and fWithCommas will be ignored.

Enumerator
fUseLowercase 

Use lowercase letters for string representation for bases above 10.

fWithRadix 

Prefix the output value with radix for "well-known" bases like 8 ("0") and 16 ("0x")

fWithSign 

Prefix the output value with a sign ('+'/'-')

fWithCommas 

Use commas as thousands separator.

fDoubleFixed 

DoubleToString*(): Use n.nnnn format for double conversions.

fDoubleScientific 

DoubleToString*(): Use scientific format for double conversions.

fDoublePosix 

DoubleToString*(): Use C locale for double conversions.

fDoubleGeneral 
fDS_Binary 

UInt8ToString_DataSize(): Use 1024 as a kilobyte factor, not 1000.

fDS_NoDecimalPoint 

UInt8ToString_DataSize(): Do not add a decimal point ("10KB" vs "10.0KB")

fDS_PutSpaceBeforeSuffix 

UInt8ToString_DataSize(): Add space between value and qualifiers, like "10.0 KB".

fDS_ShortSuffix 

UInt8ToString_DataSize(): Use short suffix, like "10.0K".

fDS_PutBSuffixToo 

UInt8ToString_DataSize(): Use "B" suffix for small bytes values.

Definition at line 250 of file ncbistr.hpp.

◆ EOccurrence

Whether it is the first or last occurrence.

Deprecated:
Enumerator
eFirst 

First occurrence.

eLast 

Last occurrence.

Definition at line 1939 of file ncbistr.hpp.

◆ EPrintableMode

How to display printable strings.

Assists in making a printable version of "str".

Enumerator
fNewLine_Quote 

Display "\n" instead of actual linebreak.

eNewLine_Quote 
fNewLine_Passthru 

Break the line at every "\n" occurrence.

eNewLine_Passthru 
fNonAscii_Passthru 

Allow non-ASCII but printable characters.

fNonAscii_Quote 

Octal for all non-ASCII characters.

fPrintable_Full 

Show all octal digits at all times.

Definition at line 2727 of file ncbistr.hpp.

◆ EQuoted

Define that string is quoted or not.

Enumerator
eQuoted 

String is quoted.

eNotQuoted 

String is not quoted.

Definition at line 2987 of file ncbistr.hpp.

◆ ESplitFlags

Flags for Split*() methods.

Note
With quote support enabled, doubling a quote character suppresses its special meaning, as does escaping it if that's enabled too; unescaped trailing backslashes and unbalanced quotes result in exceptions.
All escape symbols, single or double quotes became removed if a corresponding fSplit_Can* flag is used.
Enumerator
fSplit_MergeDelimiters 

Merge adjacent delimiters.

fSplit_Truncate_Begin 

Truncate leading delimiters.

fSplit_Truncate_End 

Truncate trailing delimiters.

fSplit_Truncate 
fSplit_ByPattern 

Require full delimiter strings.

fSplit_CanEscape 

Allow \... escaping.

fSplit_CanSingleQuote 

Allow '...' quoting.

fSplit_CanDoubleQuote 

Allow "..." quoting.

fSplit_CanQuote 
fSplit_Tokenize 

All delimiters are merged and trimmed, to get non-empty tokens only.

Definition at line 2497 of file ncbistr.hpp.

◆ ESqlEncode

SQL encode flags.

Enumerator
eSqlEnc_Plain 

Always produce '...', with no tag.

eSqlEnc_TagNonASCII 

Produce N'...' when input's not pure ASCII.

Definition at line 3166 of file ncbistr.hpp.

◆ ESS_Flags

Flags for Sanitize().

Enumerator
fSS_alpha 

Check on isalpha()

fSS_digit 

Check on isdigit()

fSS_alnum 

Check on isalnum()

fSS_print 

Check on isprint()

fSS_cntrl 

Check on iscntrl()

fSS_punct 

Check on ispunct()

fSS_Reject 

Reject specified characters, allow all other.

Revert default behavior, that allow specified characters and reject all other.

fSS_Remove 

Remove (rather than replace) rejected chars.

fSS_NoMerge 

Do not merge adjacent spaces (rejected chars)

fSS_NoTruncate_Begin 

Do not truncate leading spaces.

fSS_NoTruncate_End 

Do not truncate trailing spaces.

fSS_NoTruncate 

Definition at line 2833 of file ncbistr.hpp.

◆ EStringToNumFlags

String to number conversion flags.

Enumerator
fConvErr_NoThrow 

Do not throw an exception on error.

Could be used with methods throwing an exception by default, ignored otherwise. Just return zero and set errno to non-zero instead of throwing an exception. We recommend the following technique to check against errors with minimum overhead when this flag is used:

if (!retval && errno != 0)
ERROR;

And for StringToDouble*() variants:

if (retval == HUGE_VAL || retval == -HUGE_VAL ||
!retval && errno != 0)
ERROR;
fConvErr_NoErrMessage 

Set errno, but do not set CNcbiError message on error.

fMandatorySign 

Check on mandatory sign. See 'ENumToStringFlags::fWithSign'.

fAllowCommas 

Allow commas. See 'ENumToStringFlags::fWithCommas'.

fAllowLeadingSpaces 

Ignore leading spaces in converted string.

fAllowLeadingSymbols 

Ignore leading non-numeric characters.

fAllowTrailingSpaces 

Ignore trailing space characters.

fAllowTrailingSymbols 

Ignore trailing non-numerics characters.

fDecimalPosix 

StringToDouble*(): For decimal point, use C locale.

fDecimalPosixOrLocal 

StringToDouble*(): For decimal point, try both C and current locale.

fDecimalPosixFinite 

StringToDouble*(): Keep result finite and normalized: if DBL_MAX < result < INF, result becomes DBL_MAX if 0 < result < DBL_MIN, result becomes DBL_MIN.

fDS_ForceBinary 

StringToUInt8_DataSize(): Use 1024 as a kilobyte factor regardless of suffix, like "KB" or "KiB".

fDS_ProhibitFractions 

StringToUInt8_DataSize(): Ignore any fraction part of a value, "1.2K" ~ "1K".

fDS_ProhibitSpaceBeforeSuffix 

StringToUInt8_DataSize(): Do not allow spaces between value and suffix, like "10 K".

Definition at line 269 of file ncbistr.hpp.

◆ EStringType [1/2]

Type of string to be decoded.

Enumerator
eName 
eValue 

Definition at line 4537 of file ncbistr.hpp.

◆ EStringType [2/2]

Type of string to be decoded.

Enumerator
eName 
eValue 

Definition at line 4553 of file ncbistr.hpp.

◆ ETrunc

Which end to truncate a string.

Enumerator
eTrunc_Begin 

Truncate leading spaces only.

eTrunc_End 

Truncate trailing spaces only.

eTrunc_Both 

Truncate spaces at both begin and end of string.

Definition at line 2239 of file ncbistr.hpp.

◆ EUrlDecode

URL decode flags.

Enumerator
eUrlDec_All 

Decode '+' to space.

eUrlDec_Percent 

Decode only XX.

Definition at line 3157 of file ncbistr.hpp.

◆ EUrlEncode

URL-encode flags.

Enumerator
eUrlEnc_SkipMarkChars 

Do not convert chars like '!', '(' etc.

eUrlEnc_ProcessMarkChars 

Convert all non-alphanumeric chars, spaces are converted to '+'.

eUrlEnc_PercentOnly 

Convert all non-alphanumeric chars including space and '' to %## format.

eUrlEnc_Path 

Same as ProcessMarkChars but preserves valid path characters ('/', '.')

eUrlEnc_URIScheme 

Encode scheme part of an URI.

eUrlEnc_URIUserinfo 

Encode userinfo part of an URI.

eUrlEnc_URIHost 

Encode host part of an URI.

eUrlEnc_URIPath 

Encode path part of an URI.

eUrlEnc_URIQueryName 

Encode query part of an URI, arg name.

eUrlEnc_URIQueryValue 

Encode query part of an URI, arg value.

eUrlEnc_URIFragment 

Encode fragment part of an URI.

eUrlEnc_Cookie 

Same as SkipMarkChars with encoded ','.

eUrlEnc_None 

Do not encode.

Definition at line 3141 of file ncbistr.hpp.

◆ EValidate

How to verify character encoding of the source data.

Enumerator
eNoValidate 
eValidate 

Definition at line 3876 of file ncbistr.hpp.

◆ EWrapFlags

How to wrap the words in a string to a new line.

Enumerator
fWrap_Hyphenate 

Add a hyphen when breaking words?

fWrap_HTMLPre 

Wrap as pre-formatted HTML?

fWrap_FlatFile 

Wrap for flat file use.

Definition at line 3227 of file ncbistr.hpp.

◆ EXmlEncode

XML-encode flags.

Enumerator
eXmlEnc_Contents 

Encode predefined entities only.

eXmlEnc_CommentSafe 

Encode double hyphen and ending hyphen, making the result safe to put into XML comments.

eXmlEnc_Unsafe_Skip 

Check each character to conform XML 1.1 standards, skip any not allowed character or throw an CStringException.

https://www.w3.org/TR/xml11/#NT-Char

eXmlEnc_Unsafe_Throw 

Definition at line 3025 of file ncbistr.hpp.

◆ EZeroAtEnd

Enumerator
eNoZeroAtEnd 

For compatibility with older code.

eHasZeroAtEnd 

Definition at line 913 of file tempstr.hpp.

Function Documentation

◆ Add() [1/2]

void CTempStringList::Add ( const CTempString s)
inline

◆ Add() [2/2]

template<size_t num_prealloc, typename TIn , typename TOut >
CTextJoiner< num_prealloc, TIn, TOut > & CTextJoiner< num_prealloc, TIn, TOut >::Add ( const TIn &  s)
inline

◆ Advance() [1/2]

bool CStrTokenizeBase::Advance ( CTempStringList part_collector)
inline

Return TRUE if it found some text and put it into collector.

The collector can have empty strings, even if function returns FALSE.

Note
This method don't honor NStr::fSplit_Truncate_Begin flag, due it's stream nature, so you should process it in the calling code. NStr::fSplit_Truncate_Begin is honored.

Definition at line 156 of file ncbistr_util.hpp.

References NULL.

Referenced by CStringTokenCount::Count(), and CStrTokenize< TStr, TV, TP, TCount, TReserve >::Do().

◆ Advance() [2/2]

bool CStrTokenizeBase::Advance ( CTempStringList part_collector,
SIZE_TYPE ptr_part_start,
SIZE_TYPE ptr_delim_pos 
)

Definition at line 7419 of file ncbistr.cpp.

◆ Allocate()

char * CTempString_Storage::Allocate ( CTempString::size_type  len)

Definition at line 7412 of file ncbistr.cpp.

◆ Append() [1/4]

virtual void NStr::CWrapDestStringList::Append ( const CTempString s)
inlinevirtual

◆ Append() [2/4]

virtual void NStr::IWrapDest::Append ( const CTempString s)
pure virtual

◆ Append() [3/4]

virtual void NStr::CWrapDestStringList::Append ( const string s)
inlinevirtual

Implements NStr::IWrapDest.

Definition at line 3282 of file ncbistr.hpp.

References NStr::CWrapDestStringList::m_list.

◆ Append() [4/4]

virtual void NStr::IWrapDest::Append ( const string s)
pure virtual

◆ AppendAsUTF8() [1/7]

static CStringUTF8& CUtf8::AppendAsUTF8 ( CStringUTF8 dest,
char  ch,
const locale lcl 
)
inlinestatic

Convert non-Unicode character into UTF8 and append it to existing string.

Parameters
destExisting UTF8 string
chCharacter
lclCharacter locale return reference to modified dest string

Definition at line 4058 of file ncbistr.hpp.

References CUtf8::x_Append().

◆ AppendAsUTF8() [2/7]

static CStringUTF8& CUtf8::AppendAsUTF8 ( CStringUTF8 dest,
char  ch,
EEncoding  encoding,
EValidate  validate = eNoValidate 
)
inlinestatic

Convert non-Unicode character into UTF8 and append it to existing string.

Parameters
destExisting UTF8 string
chCharacter
encodingCharacter encoding
validateVerify the character encoding of the source return reference to modified dest string

Definition at line 4039 of file ncbistr.hpp.

References validate(), and CUtf8::x_Append().

◆ AppendAsUTF8() [3/7]

template<typename TChar >
static enable_if< is_integral<TChar>::value && (1 < sizeof(TChar)), CStringUTF8& >::type CUtf8::AppendAsUTF8 ( CStringUTF8 dest,
const basic_string< TChar > &  src 
)
inlinestatic

Convert Unicode C++ string into UTF8 and append it to existing string.

Parameters
destExisting UTF8 string
srcSource Unicode string return reference to modified dest string

Definition at line 3950 of file ncbistr.hpp.

References CUtf8::x_Append().

◆ AppendAsUTF8() [4/7]

static CStringUTF8& CUtf8::AppendAsUTF8 ( CStringUTF8 dest,
const CTempString src,
const locale lcl 
)
inlinestatic

Convert non-Unicode C++ string into UTF8 and append it to existing string.

Parameters
destExisting UTF8 string
srcSource string
lclSource string locale return reference to modified dest string

Definition at line 4019 of file ncbistr.hpp.

References CUtf8::x_Append().

◆ AppendAsUTF8() [5/7]

static CStringUTF8& CUtf8::AppendAsUTF8 ( CStringUTF8 dest,
const CTempString src,
EEncoding  encoding,
EValidate  validate = eNoValidate 
)
inlinestatic

Convert non-Unicode C++ string into UTF8 and append it to existing string.

Parameters
destExisting UTF8 string
srcSource string
encodingCharacter encoding of the source string
validateVerify the character encoding of the source return reference to modified dest string

Definition at line 4000 of file ncbistr.hpp.

References validate(), and CUtf8::x_Append().

◆ AppendAsUTF8() [6/7]

template<typename TChar >
static enable_if< is_integral<TChar>::value && (1 < sizeof(TChar)), CStringUTF8& >::type CUtf8::AppendAsUTF8 ( CStringUTF8 dest,
const TChar src,
SIZE_TYPE  tchar_count = NCBI_NS_STD::string::npos 
)
inlinestatic

Convert Unicode character buffer into UTF8 and append it to existing string.

Parameters
destExisting UTF8 string
srcSource Unicode character buffer
tchar_countNumber of characters in the buffer; If it equals to NPOS, buffer is assumed to be zero-terminated return reference to modified dest string

Definition at line 3968 of file ncbistr.hpp.

References CUtf8::x_Append().

◆ AppendAsUTF8() [7/7]

template<typename TChar >
static enable_if< is_integral<TChar>::value && (1 < sizeof(TChar)), CStringUTF8& >::type CUtf8::AppendAsUTF8 ( CStringUTF8 dest,
TChar  ch 
)
inlinestatic

Convert Unicode symbol into UTF8 and append it to existing string.

Parameters
destExisting UTF8 string
chUnicode symbol return reference to modified dest string

Definition at line 3983 of file ncbistr.hpp.

References CUtf8::x_Append().

◆ AsBasicString() [1/2]

template<typename TChar >
static enable_if< is_integral<TChar>::value && (1 < sizeof(TChar)), basic_string<TChar> >::type CUtf8::AsBasicString ( const CTempString src)
inlinestatic

Definition at line 4115 of file ncbistr.hpp.

References CUtf8::eNoValidate.

◆ AsBasicString() [2/2]

template<typename TChar >
static enable_if< is_integral<TChar>::value && (1 < sizeof(TChar)), basic_string<TChar> >::type CUtf8::AsBasicString ( const CTempString src,
const TChar substitute_on_error,
EValidate  validate = eNoValidate 
)
inlinestatic

Convert UTF8 string into Unicode.

Can throw a CStringException if the conversion is impossible or the string has invalid UTF-8 encoding.

Parameters
srcSource UTF8 string
substitute_on_errorIf the conversion is impossible, append the provided string or, if substitute_on_error equals 0, throw an exception
validateVerify UTF8 character encoding of the source
Attention
Only for TStringUnicode, TStringUCS4, TStringUCS2, wstring types

Definition at line 4108 of file ncbistr.hpp.

References validate(), and CUtf8::x_AsBasicString().

◆ assign() [1/8]

CTempString & CTempString::assign ( const char *  src_str,
size_type  len 
)
inline

◆ assign() [2/8]

CTempStringEx& CTempStringEx::assign ( const char *  str,
size_type  len 
)
inline

Assign new values to the content of the a string.

Definition at line 970 of file tempstr.hpp.

References CTempString::assign(), CTempStringEx::eNoZeroAtEnd, len, CTempStringEx::m_ZeroAtEnd, and str().

Referenced by CWigBufferedLineReader::operator++(), and CStrTokenizeBase::SetDelim().

◆ assign() [3/8]

CTempStringEx& CTempStringEx::assign ( const char *  str,
size_type  len,
EZeroAtEnd  zero_at_end 
)
inline

Definition at line 976 of file tempstr.hpp.

References CTempString::assign(), len, CTempStringEx::m_ZeroAtEnd, and str().

◆ assign() [4/8]

CTempStringEx& CTempStringEx::assign ( const CTempString str)
inline

◆ assign() [5/8]

CTempString & CTempString::assign ( const CTempString  src_str)
inline

◆ assign() [6/8]

CTempString & CTempString::assign ( const CTempString  src_str,
size_type  pos,
size_type  len 
)
inline

◆ assign() [7/8]

CTempStringEx& CTempStringEx::assign ( const CTempString  str,
size_type  pos,
size_type  count 
)
inline

◆ assign() [8/8]

CTempStringEx& CTempStringEx::assign ( const CTempStringEx str)
inline

Definition at line 989 of file tempstr.hpp.

References str().

◆ AsSingleByteString() [1/2]

string CUtf8::AsSingleByteString ( const CTempString src,
const locale lcl,
const char *  substitute_on_error = 0,
EValidate  validate = eNoValidate 
)
static

Definition at line 7000 of file ncbistr.cpp.

◆ AsSingleByteString() [2/2]

string CUtf8::AsSingleByteString ( const CTempString src,
EEncoding  encoding,
const char *  substitute_on_error = 0,
EValidate  validate = eNoValidate 
)
static

Convert UTF8 string into a single-byte character representation.

Can throw a CStringException if the conversion is impossible or the string has invalid UTF-8 encoding.

Parameters
srcSource UTF8 string
encodingEncoding of the result
substitute_on_errorIf the conversion is impossible, append the provided string or, if substitute_on_error equals 0, throw an exception
validateVerify UTF8 character encoding of the source
Returns
C++ string

Definition at line 6983 of file ncbistr.cpp.

Referenced by CField_type::GetDBLinkFieldFromUserObject(), CObjectIStreamXml::ReadString(), CSplitDblinkQuals::x_ConvertStrsToStrs(), x_MakeTSqlString(), CSplitDblinkQuals::x_SplitQuals(), and CWString::x_UTF8ToString().

◆ AStrEquiv()

template<class Arg1 , class Arg2 , class Pred >
bool AStrEquiv ( const Arg1 &  x,
const Arg2 &  y,
Pred  pr 
)
inline

◆ AsUTF8() [1/4]

template<typename TChar >
static enable_if< is_integral<TChar>::value && (1 < sizeof(TChar)), CStringUTF8>::type CUtf8::AsUTF8 ( const basic_string< TChar > &  src)
inlinestatic

Convert into UTF8 from a Unicode C++ string.

Parameters
srcSource string
Attention
Only for TStringUnicode, TStringUCS4, TStringUCS2, wstring types

Definition at line 3919 of file ncbistr.hpp.

References CUtf8::x_Append().

◆ AsUTF8() [2/4]

static CStringUTF8 CUtf8::AsUTF8 ( const CTempString src,
const locale lcl 
)
inlinestatic

Convert into UTF8 from a C/C++ string.

Parameters
srcSource string
lclString locale

Definition at line 3904 of file ncbistr.hpp.

References CUtf8::x_Append().

◆ AsUTF8() [3/4]

static CStringUTF8 CUtf8::AsUTF8 ( const CTempString src,
EEncoding  encoding,
EValidate  validate = eNoValidate 
)
inlinestatic

Convert into UTF8 from a C/C++ string.

Parameters
srcSource string
encodingCharacter encoding of the source string
validateVerify the character encoding of the source

Definition at line 3889 of file ncbistr.hpp.

References validate(), and CUtf8::x_Append().

Referenced by CReadUtil::AddGeneOntologyTerm(), CSplignFormatter::AsSeqAlignSet(), CTL_Cmd::AssignCmdParam(), pythonpp::CString::AsStdSring(), CStringDataType::CreateDefault(), CDbapiSimpleApp::DemoDynamicSql(), CSdbapiSimpleApp::DemoDynamicSql(), CSubSource::FixLatLonFormat(), CSQLITE_Statement::GetColumnName(), CODBC_Connection::GetDriverName(), CLastErrorAdapt::GetErrCodeString(), CHTMLHelper::HTMLDecode(), operator+(), CArgDesc::PrintXml(), CObjectIStreamAsn::ReadAnyContentObject(), CObjectIStreamJson::ReadAnyContentObject(), CObjectIStreamXml::ReadAnyContentObject(), CObjectIStreamJson::ReadEncodedChar(), ReadIntoUtf8(), CObjectIStreamXml::ReadString(), CCleanup::s_CleanupStructuredComment(), s_ConvertValue(), s_SetContainerData(), s_SetPrimitiveData(), s_WriteXmlLine(), pythonpp::bind::CString::SetInternal(), CSerialObject::UnassignedStringUTF8(), utf8_to_string(), CObjectOStreamJson::WriteEncodedChar(), CObjectOStreamXml::WriteEncodedChar(), CDB_Stream::x_Append(), CSourceModParser::x_ApplyTPAMods(), CSplitDblinkQuals::x_ConvertStrToStrs(), CStatementBase::x_GetData(), CUtf8::x_GetValidSymbolCount(), CWString::x_MakeString(), x_MakeTSqlString(), CWString::x_MakeUTF8String(), CObjectIStreamXml::x_ReadEncodedChar(), CFeaturePanel::x_SaveSettings(), CDescrModApply::x_SetTpaAssembly(), and CWString::x_StringToUTF8().

◆ AsUTF8() [4/4]

template<typename TChar >
static enable_if< is_integral<TChar>::value && (1 < sizeof(TChar)), CStringUTF8>::type CUtf8::AsUTF8 ( const TChar src,
SIZE_TYPE  tchar_count = NCBI_NS_STD::string::npos 
)
inlinestatic

Convert into UTF8 from a Unicode character buffer.

Parameters
srcSource character buffer
tchar_countNumber of characters in the buffer; If it equals to NPOS, buffer is assumed to be zero-terminated

Definition at line 3934 of file ncbistr.hpp.

References CUtf8::x_Append().

◆ AtEnd()

bool CStrTokenizeBase::AtEnd ( void  ) const
inline

◆ Base64Decode()

string NStr::Base64Decode ( const CTempString  str)
static

Base64-decode string.

Parameters
strThe string to decode.
Returns
Encoded string, or empty line on encoding error.
See also
Base64Encode, BASE64_Encode, BASE64_Deccode

Definition at line 6286 of file ncbistr.cpp.

Referenced by CPSG_NamedAnnotInfo::GetId2AnnotInfoList(), and SDataOnlyCopy::Process().

◆ Base64Encode()

string NStr::Base64Encode ( const CTempString  str,
size_t  line_len = 0 
)
static

Base64-encode string.

Parameters
strThe string to encode.
line_lenSpecify a length for Base64-encoded lines. Default 0 mean no line breaks at all.
Returns
Encoded string.
See also
Base64Decode, BASE64_Encode, BASE64_Deccode

Definition at line 6270 of file ncbistr.cpp.

Referenced by CJsonResponse::Fill(), CPSGS_OSGAnnot::SendReplies(), ToJsonString(), CPSGS_CDDProcessor::x_SendAnnotInfo(), and CPSGS_SNPProcessor::x_SendAnnotInfo().

◆ begin()

CTempString::const_iterator CTempString::begin ( void  ) const
inline

◆ BoolToString()

const string NStr::BoolToString ( bool  value)
static

Convert bool to string.

Parameters
valueBoolean value to be converted.
Returns
One of: 'true, 'false'
Note
Don't change errno.

Definition at line 2815 of file ncbistr.cpp.

Referenced by CReportParams::Add(), CPluginArgSet::AddDefaultFlag(), BOOST_AUTO_TEST_CASE(), CNcbiApplogApp::Cmd_Health(), SQueueParameters::ConfigSection(), CRegistryReadView::DumpAll(), CMacroAdvStringConstraintPanel< T >::GetFuncWithArgs(), CGuiObjectInfoSeq_align::GetLinks(), CQueueParamAccessor::GetParamValue(), SQueueParameters::GetPrintableParameters(), CGeneModelFactory::GetSettings(), CVariant::GetString(), CMacroAdvStringConstraintPanel< T >::GetTextConstraint(), NMItemData::GetUpdatemRNAVar(), CAddAssemblyGapsNTreeItemData::GetVariables(), CAddGapsNTreeItemData::GetVariables(), CParseQualTreeItemData::GetVariables(), CRmvOutsideQualTreeItemData::GetVariables(), CApplyTableItemData::GetVariables(), CMacroInterpreter::InterpretDoFunctions(), CDebugDumpContext::Log(), impl::CDriverContext::MakeConnection(), value_slice::CValueConvert< CP, bool >::operator string(), CDoQueryTreeGetArgs::operator()(), CWhereQueryTreeGetArgs::operator()(), CQueryTreePrintFunc::operator()(), CDiagContext_Extra::Print(), CArgDesc_Flag::ProcessArgument(), CArgDesc_Flag::ProcessDefault(), CSGQueryNodeValue::PromoteTo(), CSampleBasicApplication::Run(), s_ConvertValue(), s_ScanRecursive(), CGeneModelConfig::SaveSettingsAsString(), SNSAlertAttributes::Serialize(), CMbIndexArgs::SetArgumentDescriptions(), CPluginValue::SetBoolean(), CMacroRep::SetFunctionParameterAsBool(), IRWRegistry::SetValue(), IMacroActionItemData::TransferDataToPanel(), CParamParser< TDescription, TParam >::ValueToString(), CNCServer::WriteAppSetup(), CJob::x_AppendNeedListenerProgressMsgNotif(), CJob::x_AppendNeedStolenNotif(), CJob::x_AppendNeedSubmitProgressMsgNotif(), CMacroInterpreter::x_ApplyUnverifiedValidateArgs(), CMacroInterpreter::x_ConvertFeatQualValidateArgs(), CMacroInterpreter::x_ConvertRNARelQualValidateArgs(), CMacroInterpreter::x_ConvertStringQualValidateArgs(), CNCMessageHandler::x_DoCmd_Version(), CMacroInterpreter::x_EditRelFeatQualValidateArgs(), CMacroInterpreter::x_EditStringQualValidateArgs(), CMacroInterpreter::x_EditSubfieldValidateArgs(), CSDB_ConnectionParam::x_FillBoolParam(), CMacroPanelLoader::x_GetCheckboxSelection(), CMacroPanelLoader::x_GetRadiobuttonSelection(), CNetScheduleHandler::x_GetServerSection(), IOperateOnTwoQuals::x_GetSourceString(), CTableReaderMacro::x_GetVariables(), CAssignQueryTreeGetArgs::x_ProcessFunction(), CWhereQueryTreeGetArgs::x_ProcessFunction(), CNetScheduleHandler::x_ProcessReading(), CEpigenomicsTrack::x_SaveSettings(), CGraphOverlay::x_SaveSettings(), CGraphTrack::x_SaveSettings(), CSequenceTrack::x_SaveSettings(), CAlignmentTrack::x_SaveSettings(), CSixFramesTransTrack::x_SaveSettings(), CMacroInterpreter::x_StoreParsingArguments(), and CAttribTableColumnIdPanel::x_TableReaderMacro().

◆ CEncode()

string NStr::CEncode ( const CTempString  str,
EQuoted  quoted = eQuoted 
)
static

Encode a string for C/C++.

Parameters
strThe string to be parsed.
quotedDefine, to
See also
CParse, PrintableString

Definition at line 3967 of file ncbistr.cpp.

Referenced by CEndpointKey::CEndpointKey(), s_EncodeMetadataValue(), and CTL_LangCmd::x_GetDynamicID().

◆ CEncodedString() [1/2]

CEncodedString::CEncodedString ( const CTempString  s,
NStr::EUrlEncode  flag = NStr::eUrlEnc_SkipMarkChars 
)

Definition at line 7300 of file ncbistr.cpp.

◆ CEncodedString() [2/2]

CEncodedString::CEncodedString ( void  )
inline

Definition at line 4825 of file ncbistr.hpp.

◆ CharToSymbol() [1/2]

TUnicodeSymbol CUtf8::CharToSymbol ( char  ch,
const locale lcl 
)
static

Convert encoded character into Unicode.

Parameters
chEncoded character
lclCharacter locale
Returns
Unicode code point (symbol)

Definition at line 6935 of file ncbistr.cpp.

◆ CharToSymbol() [2/2]

TUnicodeSymbol CUtf8::CharToSymbol ( char  ch,
EEncoding  encoding 
)
static

Convert encoded character into Unicode.

Parameters
chEncoded character
encodingCharacter encoding
Returns
Unicode code point (symbol)

Definition at line 6839 of file ncbistr.cpp.

Referenced by CObjectIStreamJson::ReadEncodedChar(), s_SetPrimitiveData(), CObjectOStreamXml::WriteEncodedChar(), and CObjectIStreamXml::x_ReadEncodedChar().

◆ Clear()

void CTempStringList::Clear ( void  )
inline

◆ clear() [1/2]

void CTempString::clear ( void  )
inline

◆ clear() [2/2]

void CTempStringEx::clear ( void  )
inline

◆ CommonOverlapSize()

SIZE_TYPE NStr::CommonOverlapSize ( const CTempString  s1,
const CTempString  s2 
)
static

Determine if the suffix of one string is the prefix of another.

Parameters
s1String to be compared – operand 1.
s2String to be compared – operand 2.
Returns
The number of characters common to the end of the first string and the start of the second string.

Definition at line 3101 of file ncbistr.cpp.

◆ CommonPrefixSize()

SIZE_TYPE NStr::CommonPrefixSize ( const CTempString  s1,
const CTempString  s2 
)
inlinestatic

Determine the common prefix of two strings.

Parameters
s1String to be compared – operand 1.
s2String to be compared – operand 2.
Returns
The number of characters common to the start of each string.
Examples
/home/coremake/doxygen/cxx/include/corelib/ncbistr.hpp.

Definition at line 5450 of file ncbistr.hpp.

References i, CTempString::length(), min(), and n.

Referenced by CDiff::Diff(), CCreateGeneModelTask::x_AssignIDsAndUpdateGenes(), CDiffList::x_CleanupAndMerge_Equities(), and CDiff::x_DiffHalfMatchI().

◆ CommonSuffixSize()

SIZE_TYPE NStr::CommonSuffixSize ( const CTempString  s1,
const CTempString  s2 
)
inlinestatic

Determine the common suffix of two strings.

Parameters
s1String to be compared – operand 1.
s2String to be compared – operand 2.
Returns
The number of characters common to the end of each string.
Examples
/home/coremake/doxygen/cxx/include/corelib/ncbistr.hpp.

Definition at line 5462 of file ncbistr.hpp.

References i, CTempString::length(), min(), and n.

Referenced by CDiff::Diff(), GetExtraAccession(), CDiffList::x_CleanupAndMerge_Equities(), and CDiff::x_DiffHalfMatchI().

◆ Compare() [1/15]

template<typename _TChar >
static int XStr::Compare ( const _TChar *  s1,
const _TChar *  s2,
ECase  use_case = eCase 
)
inlinestatic

Definition at line 375 of file ncbi_xstr.hpp.

References XStr::CompareCase(), XStr::CompareNocase(), and XStr::eCase.

◆ Compare() [2/15]

template<typename _TChar >
static int XStr::Compare ( const _TChar *  s1,
const basic_string< _TChar > &  s2,
ECase  use_case = eCase 
)
inlinestatic

Definition at line 387 of file ncbi_xstr.hpp.

References XStr::CompareCase(), XStr::CompareNocase(), and XStr::eCase.

◆ Compare() [3/15]

template<typename _TChar >
static int XStr::Compare ( const _TChar *  str,
SIZE_TYPE  pos,
SIZE_TYPE  n,
const _TChar *  pattern,
ECase  use_case = eCase 
)
inlinestatic

Definition at line 290 of file ncbi_xstr.hpp.

References XStr::CompareCase(), XStr::CompareNocase(), XStr::eCase, n, and str().

◆ Compare() [4/15]

template<typename _TChar >
static int XStr::Compare ( const _TChar *  str,
SIZE_TYPE  pos,
SIZE_TYPE  n,
const basic_string< _TChar > &  pattern,
ECase  use_case = eCase 
)
inlinestatic

Definition at line 303 of file ncbi_xstr.hpp.

References XStr::CompareCase(), XStr::CompareNocase(), XStr::eCase, n, and str().

◆ Compare() [5/15]

template<typename _TChar >
static int XStr::Compare ( const basic_string< _TChar > &  s1,
const _TChar *  s2,
ECase  use_case = eCase 
)
inlinestatic

Definition at line 369 of file ncbi_xstr.hpp.

References XStr::CompareCase(), XStr::CompareNocase(), and XStr::eCase.

◆ Compare() [6/15]

template<typename _TChar >
static int XStr::Compare ( const basic_string< _TChar > &  s1,
const basic_string< _TChar > &  s2,
ECase  use_case = eCase 
)
inlinestatic

Definition at line 381 of file ncbi_xstr.hpp.

References XStr::CompareCase(), XStr::CompareNocase(), and XStr::eCase.

◆ Compare() [7/15]

template<typename _TChar >
static int XStr::Compare ( const basic_string< _TChar > &  str,
SIZE_TYPE  pos,
SIZE_TYPE  n,
const _TChar *  pattern,
ECase  use_case = eCase 
)
inlinestatic

Definition at line 284 of file ncbi_xstr.hpp.

References XStr::CompareCase(), XStr::CompareNocase(), XStr::eCase, n, and str().

◆ Compare() [8/15]

template<typename _TChar >
static int XStr::Compare ( const basic_string< _TChar > &  str,
SIZE_TYPE  pos,
SIZE_TYPE  n,
const basic_string< _TChar > &  pattern,
ECase  use_case = eCase 
)
inlinestatic

Definition at line 297 of file ncbi_xstr.hpp.

References XStr::CompareCase(), XStr::CompareNocase(), XStr::eCase, n, and str().

◆ Compare() [9/15]

int NStr::Compare ( const char *  s1,
const char *  s2,
ECase  use_case = eCase 
)
inlinestatic

Compare two strings – char* version.

Parameters
s1String to be compared – operand 1.
s2String to be compared – operand 2.
use_caseWhether to do a case sensitive compare(default is eCase), or a case-insensitive compare (eNocase).
Returns
  • 0, if s1 == s2.
  • Negative integer, if s1 < s2.
  • Positive integer, if s1 > s2.
See also
Other forms of overloaded Compare() with differences in argument types: char* vs. CTempString[Ex]

Definition at line 5313 of file ncbistr.hpp.

References NStr::CompareCase(), NStr::CompareNocase(), and NStr::eCase.

◆ Compare() [10/15]

int NStr::Compare ( const CTempString  s1,
SIZE_TYPE  pos,
SIZE_TYPE  n,
const char *  s2,
ECase  use_case = eCase 
)
inlinestatic

Compare of a substring with another string.

Parameters
s1String containing the substring to be compared.
posStart position of substring to be compared.
nNumber of characters in substring to be compared.
s2String (char*) to be compared with substring.
use_caseWhether to do a case sensitive compare(eCase – default), or a case-insensitive compare (eNocase).
Returns
  • 0, if s1[pos:pos+n) == s2;
  • Negative integer, if s1[pos:pos+n) < s2;
  • Positive integer, if s1[pos:pos+n) > s2.
See also
Other forms of overloaded Compare() with differences in argument types: char* vs. CTempString[Ex]
Examples
/home/coremake/doxygen/cxx/include/corelib/ncbistr.hpp.

Definition at line 5297 of file ncbistr.hpp.

References NStr::CompareCase(), NStr::CompareNocase(), NStr::eCase, n, and CTempString::substr().

Referenced by CAutoDefSourceDescription::Compare(), CTraversalNode::CUserCall::Compare(), CSUCLine::Compare(), PCase_Generic< T >::Compare(), PNocase_Generic< T >::Compare(), PNocase_Conditional_Generic< T >::Compare(), CTable2AsnContext::CopyFeatureIdsToComments(), CDirEntry::CreateRelativePath(), CSGQueryFunctionCompare::Evaluate(), CQueryFuncPromoteEq::Evaluate(), CQueryFuncPromoteIn::Evaluate(), CQueryFuncPromoteGtLt::Evaluate(), CQueryFuncPromoteBetween::Evaluate(), CDllResolver::FindCandidates(), impl::g_SubstituteParam(), CResultSet::GetColNum(), GetFieldDiffsFromNameValLists(), impl::CDBConnParamsBase::GetProtocolVersion(), CLatLonCountryMap::IsCountryInLatLon(), CFeatComparatorByLabel::Less(), CSpectrumSet::LoadMultDTA(), CAttribTableColumnIdPanel::OnMatchColumnClick(), CTraversalNode::SRefNodeCallLessthan::operator()(), IsStandard::operator()(), SChildLess::operator()(), CBDB_Cache::CacheKey::operator<(), operator<(), CQueryFuncPromoteBase::PreProcess(), s_CompareDescriptions(), s_CompareStructuredCommentFields(), s_FieldRuleCompare(), s_iCompareNameVals(), s_IsCDDFeat(), CConnTest::ServiceOkay(), CConnTest::x_GetFirewallConfiguration(), x_LeuCUGstart(), CSingleFeatValidator::x_ValidateGeneXRef(), CGeneValidator::x_ValidateOperon(), ASNParser::x_Value(), and CReaderBase::xSetBrowserRegion().

◆ Compare() [11/15]

int NStr::Compare ( const CTempString  s1,
SIZE_TYPE  pos,
SIZE_TYPE  n,
const CTempString  s2,
ECase  use_case = eCase 
)
inlinestatic

Compare of a substring with another string.

Parameters
s1String containing the substring to be compared.
posStart position of substring to be compared.
nNumber of characters in substring to be compared.
s2String to be compared with substring.
use_caseWhether to do a case sensitive compare(default is eCase), or a case-insensitive compare (eNocase).
Returns
  • 0, if s1[pos:pos+n) == s2;
  • Negative integer, if s1pos:pos+n) < s2;
  • Positive integer, if s1[pos:pos+n) > s2.
See also
Other forms of overloaded Compare() with differences in argument types: char* vs. CTempString[Ex]

Definition at line 5305 of file ncbistr.hpp.

References NStr::CompareCase(), NStr::CompareNocase(), NStr::eCase, n, and CTempString::substr().

◆ compare()

int CTempString::compare ( const CTempString  str) const
inline

Compare the current string with a given string.

Definition at line 806 of file tempstr.hpp.

References CTempString::data(), CTempString::length(), min(), and str().

Referenced by CStructuredCommentsReader::_AddStructuredComment(), CTempString::operator<(), and CTempString::operator>().

◆ Compare() [12/15]

int NStr::Compare ( const CTempStringEx  s1,
const CTempStringEx  s2,
ECase  use_case = eCase 
)
inlinestatic

Compare two strings – CTempStringEx version.

Parameters
s1String to be compared – operand 1.
s2String to be compared – operand 2.
use_caseWhether to do a case sensitive compare(default is eCase), or a case-insensitive compare (eNocase).
Returns
  • 0, if s1 == s2;
  • Negative integer, if s1 < s2;
  • Positive integer, if s1 > s2.
See also
Other forms of overloaded Compare() with differences in argument types: char* vs. CTempString[Ex]

Definition at line 5319 of file ncbistr.hpp.

References NStr::CompareCase(), NStr::CompareNocase(), and NStr::eCase.

◆ Compare() [13/15]

template<typename T >
int PCase_Generic< T >::Compare ( const T s1,
const T s2 
) const
inline

Return difference between "s1" and "s2".

Examples
/home/coremake/doxygen/cxx/include/corelib/ncbistr.hpp.

Definition at line 5784 of file ncbistr.hpp.

References NStr::Compare(), and NStr::eCase.

◆ Compare() [14/15]

template<typename T >
int PNocase_Generic< T >::Compare ( const T s1,
const T s2 
) const
inline

Return difference between "s1" and "s2".

Examples
/home/coremake/doxygen/cxx/include/corelib/ncbistr.hpp.

Definition at line 5819 of file ncbistr.hpp.

References NStr::Compare(), and NStr::eNocase.

Referenced by CDbtag::Compare(), CObject_id::Compare(), and CHttpCookie::sx_Compare().

◆ Compare() [15/15]

template<typename T >
int PNocase_Conditional_Generic< T >::Compare ( const T s1,
const T s2 
) const
inline

Return difference between "s1" and "s2".

Examples
/home/coremake/doxygen/cxx/include/corelib/ncbistr.hpp.

Definition at line 5857 of file ncbistr.hpp.

References NStr::Compare().

◆ CompareCase() [1/11]

template<typename _TChar >
static int XStr::CompareCase ( const _TChar *  s1,
const _TChar *  s2 
)
inlinestatic

Definition at line 339 of file ncbi_xstr.hpp.

References XStr::strcmp().

◆ CompareCase() [2/11]

template<typename _TChar >
static int XStr::CompareCase ( const _TChar *  str,
SIZE_TYPE  pos,
SIZE_TYPE  n,
const _TChar *  pattern 
)
inlinestatic

Definition at line 236 of file ncbi_xstr.hpp.

References n, and str().

◆ CompareCase() [3/11]

template<typename _TChar >
static int XStr::CompareCase ( const _TChar *  str,
SIZE_TYPE  pos,
SIZE_TYPE  n,
const basic_string< _TChar > &  pattern 
)
inlinestatic

Definition at line 249 of file ncbi_xstr.hpp.

References n, and str().

◆ CompareCase() [4/11]

template<typename _TChar >
static int XStr::CompareCase ( const basic_string< _TChar > &  s1,
const basic_string< _TChar > &  s2 
)
inlinestatic

Definition at line 345 of file ncbi_xstr.hpp.

References XStr::strcmp().

◆ CompareCase() [5/11]

template<typename _TChar >
static int XStr::CompareCase ( const basic_string< _TChar > &  str,
SIZE_TYPE  pos,
SIZE_TYPE  n,
const _TChar *  pattern 
)
inlinestatic

Definition at line 230 of file ncbi_xstr.hpp.

References n, and str().

Referenced by XStr::Compare().

◆ CompareCase() [6/11]

template<typename _TChar >
static int XStr::CompareCase ( const basic_string< _TChar > &  str,
SIZE_TYPE  pos,
SIZE_TYPE  n,
const basic_string< _TChar > &  pattern 
)
inlinestatic

Definition at line 243 of file ncbi_xstr.hpp.

References n, and str().

◆ CompareCase() [7/11]

int NStr::CompareCase ( const char *  s1,
const char *  s2 
)
inlinestatic

Case-sensitive compare of two strings – char* version.

Parameters
s1String to be compared – operand 1.
s2String to be compared – operand 2.
Returns
  • 0, if s1 == s2;
  • Negative integer, if s1 < s2;
  • Positive integer, if s1 > s2.
See also
CompareNocase(), Compare() versions with same argument types.

Definition at line 5285 of file ncbistr.hpp.

References NStr::strcmp().

◆ CompareCase() [8/11]

int NStr::CompareCase ( const CTempString  s1,
SIZE_TYPE  pos,
SIZE_TYPE  n,
const char *  s2 
)
static

Case-sensitive compare of a substring with another string.

Parameters
s1String containing the substring to be compared.
posStart position of substring to be compared.
nNumber of characters in substring to be compared.
s2String (char*) to be compared with substring.
Returns
  • 0, if s1[pos:pos+n) == s2;
  • Negative integer, if s1[pos:pos+n) < s2;
  • Positive integer, if s1[pos:pos+n) > s2.
See also
Other forms of overloaded CompareCase() with differences in argument types: char* vs. CTempString[Ex]
Examples
/home/coremake/doxygen/cxx/include/corelib/ncbistr.hpp.

Definition at line 135 of file ncbistr.cpp.

References CTempString::data(), CTempString::length(), n, and NPOS.

Referenced by BinOpsFuncString(), SNetScheduleNotificationThread::CheckNotification(), CBiosampleFieldDiff::Compare(), NStr::Compare(), CBiosampleFieldDiff::CompareAllButSequenceID(), SMakeProjectT::Create3PartyLibs(), CSDBAPI::Init(), CNcbiTestApplication::InitTestFramework(), s_ByAccVerLen::operator()(), CConvertCache::SCacheKeySort::operator()(), SCompareDirEntries::operator()(), TSortCit::operator()(), CUniSequenceDataType::PrintXMLSchema(), PromoteIfDifferent(), s_PcrPrimerCompare(), s_SeqDescCompare(), CStringOrBlobStorageReader::x_GetDataType(), CRegexpTemplateTester::x_ParseVar(), CBioseqContext::x_SetId(), and CSortedProteins::x_SortProteinNames().

◆ CompareCase() [9/11]

int NStr::CompareCase ( const CTempString  s1,
SIZE_TYPE  pos,
SIZE_TYPE  n,
const CTempString  s2 
)
static

Case-sensitive compare of a substring with another string.

Parameters
s1String containing the substring to be compared.
posStart position of substring to be compared.
nNumber of characters in substring to be compared.
s2String to be compared with substring.
Returns
  • 0, if s1[pos:pos+n) == s2;
  • Negative integer, if s1[pos:pos+n) < s2;
  • Positive integer, if s1[pos:pos+n) > s2.
See also
Other forms of overloaded CompareCase() with differences in argument types: char* vs. CTempString[Ex]

Definition at line 158 of file ncbistr.cpp.

References CTempString::data(), CTempString::empty(), CTempString::length(), n, and NPOS.

◆ CompareCase() [10/11]

int NStr::CompareCase ( const CTempStringEx  s1,
const CTempStringEx  s2 
)
static

Case-sensitive compare of two strings – CTempStringEx version.

Parameters
s1String to be compared – operand 1.
s2String to be compared – operand 2.
Returns
  • 0, if s1 == s2;
  • Negative integer, if s1 < s2;
  • Positive integer, if s1 > s2.
See also
CompareNocase(), Compare() versions with same argument types.

Definition at line 118 of file ncbistr.cpp.

References CTempString::data(), CTempString::length(), and min().

◆ CompareCase() [11/11]

template<typename _TChar >
int CTempXStr< _TChar >::CompareCase ( const CTempXStr< _TChar > &  pattern) const
inline

◆ CompareNocase() [1/11]

template<typename _TChar >
static int XStr::CompareNocase ( const _TChar *  s1,
const _TChar *  s2 
)
inlinestatic

Definition at line 354 of file ncbi_xstr.hpp.

References XStr::strcasecmp().

◆ CompareNocase() [2/11]

template<typename _TChar >
static int XStr::CompareNocase ( const _TChar *  str,
SIZE_TYPE  pos,
SIZE_TYPE  n,
const _TChar *  pattern 
)
inlinestatic

Definition at line 263 of file ncbi_xstr.hpp.

References CTempXStr< _TChar >::CompareNocase(), n, and str().

◆ CompareNocase() [3/11]

template<typename _TChar >
static int XStr::CompareNocase ( const _TChar *  str,
SIZE_TYPE  pos,
SIZE_TYPE  n,
const basic_string< _TChar > &  pattern 
)
inlinestatic

Definition at line 276 of file ncbi_xstr.hpp.

References CTempXStr< _TChar >::CompareNocase(), n, and str().

◆ CompareNocase() [4/11]

template<typename _TChar >
static int XStr::CompareNocase ( const basic_string< _TChar > &  s1,
const basic_string< _TChar > &  s2 
)
inlinestatic

Definition at line 360 of file ncbi_xstr.hpp.

References XStr::strcasecmp().

◆ CompareNocase() [5/11]

template<typename _TChar >
static int XStr::CompareNocase ( const basic_string< _TChar > &  str,
SIZE_TYPE  pos,
SIZE_TYPE  n,
const _TChar *  pattern 
)
inlinestatic

Definition at line 257 of file ncbi_xstr.hpp.

References CTempXStr< _TChar >::CompareNocase(), n, and str().

Referenced by XStr::Compare().

◆ CompareNocase() [6/11]

template<typename _TChar >
static int XStr::CompareNocase ( const basic_string< _TChar > &  str,
SIZE_TYPE  pos,
SIZE_TYPE  n,
const basic_string< _TChar > &  pattern 
)
inlinestatic

Definition at line 270 of file ncbi_xstr.hpp.

References CTempXStr< _TChar >::CompareNocase(), n, and str().

◆ CompareNocase() [7/11]

int NStr::CompareNocase ( const char *  s1,
const char *  s2 
)
inlinestatic

Case-insensitive compare of two strings – char* version.

Parameters
s1String to be compared – operand 1.
s2String to be compared – operand 2.
Returns
  • 0, if s1 == s2 (case-insensitive compare);
  • Negative integer, if s1 < s2 (case-insensitive compare);
  • Positive integer, if s1 > s2 (case-insensitive compare).
See also
CompareCase(), Compare() versions with same argument types.

Definition at line 5291 of file ncbistr.hpp.

References NStr::strcasecmp().

◆ CompareNocase() [8/11]

int NStr::CompareNocase ( const CTempString  s1,
SIZE_TYPE  pos,
SIZE_TYPE  n,
const char *  s2 
)
static

Case-insensitive compare of a substring with another string.

Parameters
s1String containing the substring to be compared.
posStart position of substring to be compared.
nNumber of characters in substring to be compared.
s2String (char*) to be compared with substring.
Returns
  • 0, if s1[pos:pos+n) == s2 (case-insensitive compare);
  • Negative integer, if s1[pos:pos+n) < s2 (case-insensitive compare);
  • Positive integer, if s1[pos:pos+n) > s2 (case-insensitive compare).
See also
Other forms of overloaded CompareNocase() with differences in argument types: char* vs. CTempString[Ex]
Examples
/home/coremake/doxygen/cxx/include/corelib/ncbistr.hpp.

Definition at line 219 of file ncbistr.cpp.

References CTempString::data(), CTempString::length(), n, NPOS, and tolower().

Referenced by CMsvcPrjProjectContext::AdditionalIncludeDirectories(), CQueryParsePanel::AddQueryText(), BinOpsFuncString(), BOOST_AUTO_TEST_CASE(), WSDLParser::BuildDataTree(), CPSGS_DummyProcessor::CanProcess(), CheckContigEverywhere(), CheckDelGbblockSourceFromDescrs(), CheckDivCode(), CRtProfiler::CheckDoReport(), CheckEmblContigEverywhere(), SInputValidator::CheckEntry(), CheckFocusInOrgs(), CheckForENV(), CheckForUnusualFullLengthOrgs(), CheckGBBlock(), CheckNeedSYNFocus(), CheckSourceFeatLocAccs(), CheckSourceOverlap(), subfuse::CmpEntry(), CSeq_id::Compare(), CSeqsRange::Compare(), NStr::Compare(), CBDB_FieldStringCase::Compare(), CBiosampleFieldDiff::CompareAllButSequenceID(), CompareDescrFeatSources(), CSeq_feat::CompareNonLocation(), CSeq_id_General_Id_Info::CompareOrdered(), CSeqTextPaneConfig::ConfigStringToFeatureDisplayType(), CDBUniversalMapper::ConfigureFromRegistry(), CICacheCF< CNetICacheClient >::ConfigureICache(), CICacheCF< CNetICacheClient >::ConfigureTimeStamp(), CConfig::ConvertRegToTree(), COperationTiming::COperationTiming(), CBlastDb_DataLoaderCF::CreateAndRegister(), CRmtBlastDb_DataLoaderCF::CreateAndRegister(), CSQLITE3_BlobCacheCF::CreateInstance(), CreateRawBioSources(), CBlastFormatUtil::CreateSeqAnnotFromSeqAlignSet(), CBlastOptionsFactory::CreateTask(), CVarTrackFactory::CreateTracks(), CRemoteAppLauncher::CRemoteAppLauncher(), CTime::DayOfWeekNameToNum(), DbxrefQualToDbtag(), SLibProjectT::DoCreate(), EnabledDelayBuffers(), EndAdded(), NStr::EqualNocase(), CQueryFuncPromoteEq::Evaluate(), CQueryFuncPromoteIn::Evaluate(), fix_pub::ExtractConsortiums(), CCompressedFile::FileExists(), fill_orgref(), fix_taxname_dot(), FixUSAAbbreviationInAffil(), fta_check_evidence(), fta_check_exception(), fta_check_old_locus_tags(), fta_cmp_gene_refs(), fta_cmp_gene_syns(), fta_cmp_locusyn(), fta_fix_tpa_keywords(), fta_get_aa_from_string(), fta_if_special_org(), fta_sort_quals(), GBQualSplit(), CCodeGenerator::GenerateCvsignore(), CCodeGenerator::GenerateFileList(), CRemoteAppTimeoutReporter::Get(), CUser_object::GetCategory(), GetCharsetEncodingForm(), CAlignFormatUtil::GetDbType(), SNetStorage::SConfig::GetDefaultStorage(), GetDRlineDataSP(), SNetStorage::SConfig::GetErrMode(), CUser_object::GetExperimentType(), CTreeQueryExec::GetFeatureIdNoCase(), CBDB_BufferManager::GetFieldIndex(), GetFlatBiomol(), CDataLoaderFactory::GetIsDefault(), CCgiApplication::GetLogOpt(), CSpectrumSet::GetMGFBlock(), SCombinedNetStorageConfig::GetMode(), GetProteinWeights(), CGridCgiContext::GetQueryStringEntryValue(), CGridCgiContext::GetRequestEntryValue(), GetResidue(), CTestArguments::GetServerName(), CCPPToolkitConnParams::GetServerType(), GetSourceDbtag(), GetSprotDescr(), CCommentItem::GetStringForTPA(), CBDB_FieldFactory::GetType(), SourceFile::GetType(), CJsonNode::GuessType(), CTableQueryExec::HasIdentifier(), CConnTest::HttpOkay(), CTableQueryExec::IdentifierType(), SNetCacheAPIImpl::Init(), CProjectsLstFileFilter::InitFromString(), CPSGS_CassProcessorBase::IsCassandraProcessorEnabled(), CTable2AsnContext::IsDBLink(), CQueueClientInfoList::IsMatchingClient(), CValidError_graph::IsSupportedGraphType(), CValidError_bioseq::IsSynthetic(), CSeqEntrySource::IsUnverified(), CFeatComparatorByLabel::Less(), CMatrixScoringMethod::Load(), CProjBulderApp::LoadDepGraph(), PssmMaker::makeDefaultPssm(), CTime::MonthNameToNum(), Normalize(), CDirEntry::NormalizePath(), NS_ValidateClasses(), NS_ValidateQueues(), StructureWindow::OnEditFavorite(), CPipeHandle::Open(), CPubseqGatewayApp::OpenCass(), CAnnotObjectType_Less::operator()(), LessThan::operator()(), SCaseInsensitiveQuickLess::operator()(), SCaseInsensitiveLess::operator()(), SCaseInsensitivePredicate::operator()(), CHttpCookies::SDomainLess::operator()(), string_nocase_less::operator()(), CMacroEngine::SKey_Less::operator()(), CSeq_id_General_Str_Info::PKeyLess::operator()(), SNodeNameUpdater::operator()(), CWGSBlobId::operator<(), CPCRParsedSet::operator<(), CSeq_id_Textseq_Info::TKey::operator<(), ParseSourceFeat(), CBDB_ConfigStructureParser::ParseStructureLine(), PickTheDescrSource(), CBlastFormat::PrintArchive(), CProjectTreeBuilder::ProcessDir(), CDataTool::ProcessModules(), ProductNamesAreSimilar(), PropogateSuppliedLineage(), QSbuf_ParseDefline(), CNetScheduleServer::ReadServicesConfig(), CNetScheduleServer::ResolveService(), CGridCommandLineInterfaceApp::Run(), CDbapiTest::Run(), CBDB_FileDumperApp::Run(), s_AccessionCompare(), s_CompareDates(), CLatLonCountryMap::s_CompareTwoLinesByCountry(), CLatLonCountryMap::s_CompareTwoLinesByLatLonThenCountry(), s_Config_less(), s_FileName_less(), s_GbQualCompare(), s_GetBaseName(), CPackString::s_GetEnvFlag(), s_GetProteinName(), s_GetUserObjectContent(), s_HasTpaUserObject(), s_iCompareNameVals(), s_Is_ISO_8859_1(), s_Is_UTF_8(), s_Is_Windows_1252(), s_IsIPAddress(), s_IsSubNode(), s_LineIndicatesOrder(), s_OrgModCompare(), s_OrgModEqual(), s_OrgrefSynCompare(), s_PCRPrimerLess(), s_PCRSetCompare(), s_SetProtRef(), s_SetServiceName(), s_SubsourceCompareC(), s_SubsourceEquivalent(), CGBDocument::Save(), SeqDB_SimplifySeqid(), CCdDbPriority::SeqIdTypeToSourceCode(), CConnTest::ServiceOkay(), CObject::SetAllocFillMode(), impl::CDriverContext::SetClientCharset(), CBlastOptions::SetFilterString(), CNetScheduleAccessList::SetHosts(), CNetCacheAPIParameters::SetMirroringMode(), CUrlArgs_Parser::SetQueryString(), CNetCacheAPIParameters::SetServerCheck(), CValidError_imp::Setup(), CNetScheduleServer::ShouldPerfLogTransitions(), CObjectIStreamXml::SkipQDecl(), SourceFeatStructFillIn(), SourceFileExt(), SpFeatKeyNameValid(), SPParseDefinition(), CConnTest::StatefulOkay(), StringEquNI(), CNetScheduleAPI::StringToStatus(), CNcbiDiag::StrToSeverityLevel(), sx_InitFillNewMemoryMode(), CReportTrim::TrimSeqGraphs(), TrimSequenceAndAnnotation(), CSrcFeatValidator::Validate(), CImpFeatValidator::Validate(), SPubseqGatewaySettings::Validate(), CValidError_imp::ValidateAuthorList(), CValidError_imp::ValidateBioSource(), CValidError_imp::ValidateOrgRef(), CValidError_bioseqset::ValidatePopSet(), CValidError_bioseq::ValidateSecondaryAccConflict(), CValidError_bioseq::ValidateSeqDescContext(), CValidError_bioseq::ValidateSeqId(), CValidError_desc::ValidateUser(), CValidError_bioseq::ValidateWGSMaster(), VisitXmlNodeProc(), CFeatureItem::x_AddQualsCdregionIdx(), CFeatureItem::x_AddQualsRna(), CFeatureItem::x_AddRegulatoryClassQual(), CSeqTextDataSourceInterval::x_AddVariationsFromFeature(), CNewCleanup_imp::x_ChangePopToPhy(), CSoapFault::x_CodeToFaultcodeEnum(), CBDB_CacheReaderCF::x_CreateInstance(), CQueueDataBase::x_Dump(), CQueryParsePanel::x_ExecuteQuery(), CLatLonCountryMap::x_FindCountryExtreme(), CGenbankGatherer::x_GatherTLS(), CGenbankGatherer::x_GatherTSA(), CGenbankGatherer::x_GatherWGS(), CTableQueryExec::x_GetColumnIdx(), CQueueDataBase::x_GetConfigQueues(), CDiagSyntaxParser::x_GetDiagSeverity(), CPubseqGatewayApp::x_GetEnabledAndDisabledProcessors(), CConnTest::x_GetFirewallConfiguration(), CGuiObjectInfoSeq_feat::x_GetGroupToolTip(), CCompressedFile::x_GetProtocol(), CSerialObject::x_GetVerifyData(), CObjectIStream::x_GetVerifyDataDefault(), CObjectOStream::x_GetVerifyDataDefault(), CTableColumnTypeGuesser::x_GuessType(), CNewCleanup_imp::x_HandleTrnaProductGBQual(), CNCAlerts::x_IdToType(), CPSGAlerts::x_IdToType(), CFeatureItem::x_ImportQuals(), CRemoteBlast::x_InitDiskCache(), CValidError_bioseq::x_IsActiveFin(), CHttpHeaders::x_IsReservedHeader(), CQueryParsePanel::x_IsValidQuery(), CGff3ReadRecord::x_NormalizedAttributeKey(), CNetScheduleHandler::x_ProcessMsgQueue(), CNetScheduleHandler::x_ProcessMsgRequest(), CNetScheduleHandler::x_ProcessSetQueue(), CSoapServerApplication::x_ProcessWsdlRequest(), CQueueDataBase::x_ReadIniFileQueueClassDescriptions(), CQueueDataBase::x_ReadIniFileQueueDescriptions(), CQueueDataBase::x_ReadLinkedSections(), CCgiEntryReaderContext::x_ReadMultipartHeaders(), x_RepairCountryName(), CQueueDataBase::x_RestoreRefuseSubmitState(), CSeqDBIsam::x_StringSearch(), CVectorTrimPanel::x_TrimSeqGraphs(), CSingleFeatValidator::x_ValidateGeneXRef(), CGeneValidator::x_ValidateOperon(), CSingleFeatValidator::x_ValidateRptUnitVal(), CRNAValidator::x_ValidateTrnaCodons(), CRNAValidator::x_ValidateTrnaType(), SGridWorkerNodeImpl::x_WNCoreInit(), XMLCheckContigEverywhere(), XMLInitialEntry(), and CGtfReader::xProcessQualifierSpecialCase().

◆ CompareNocase() [9/11]

int NStr::CompareNocase ( const CTempString  s1,
SIZE_TYPE  pos,
SIZE_TYPE  n,
const CTempString  s2 
)
static

Case-insensitive compare of a substring with another string.

Parameters
s1String containing the substring to be compared.
posStart position of substring to be compared.
nNumber of characters in substring to be compared.
s2String to be compared with substring.
Returns
  • 0, if s1[pos:pos+n) == s2 (case-insensitive compare);
  • Negative integer, if s1[pos:pos+n) < s2 (case-insensitive compare);
  • Positive integer, if s1[pos:pos+n) > s2 (case-insensitive compare).
See also
Other forms of overloaded CompareNocase() with differences in argument types: char* vs. CTempString[Ex]

Definition at line 248 of file ncbistr.cpp.

References CTempString::data(), CTempString::empty(), CTempString::length(), n, NPOS, and tolower().

◆ CompareNocase() [10/11]

int NStr::CompareNocase ( const CTempStringEx  s1,
const CTempStringEx  s2 
)
static

Case-insensitive compare of two strings – CTempStringEx version.

Parameters
s1String to be compared – operand 1.
s2String to be compared – operand 2.
Returns
  • 0, if s1 == s2 (case-insensitive compare);
  • Negative integer, if s1 < s2 (case-insensitive compare);
  • Positive integer, if s1 > s2 (case-insensitive compare).
See also
CompareCase(), Compare() versions with same argument types.

Definition at line 190 of file ncbistr.cpp.

References CTempString::data(), CTempString::length(), min(), n, and tolower().

◆ CompareNocase() [11/11]

template<typename _TChar >
int CTempXStr< _TChar >::CompareNocase ( const CTempXStr< _TChar > &  pattern) const
inline

◆ Copy()

void CTempString::Copy ( string dst,
size_type  pos,
size_type  len 
) const
inline

Copy a substring into a string Somewhat similar to basic_string::assign()

Copy a substring into a string.

These are analogs of basic_string::assign().

Definition at line 525 of file tempstr.hpp.

References CTempString::begin(), len, CTempString::length(), and min().

Referenced by CReadUtil::AddGeneOntologyTerm(), and CSourceModParser::x_ApplyMods().

◆ Count() [1/2]

static size_t CStrDummyTokenCount::Count ( CStrTokenizeBase )
inlinestatic

Definition at line 66 of file ncbistr_util.hpp.

◆ Count() [2/2]

static size_t CStringTokenCount::Count ( CStrTokenizeBase tokenizer)
inlinestatic

Definition at line 330 of file ncbistr_util.hpp.

References CStrTokenizeBase::Advance(), CStrTokenizeBase::AtEnd(), and NULL.

◆ CParse()

string NStr::CParse ( const CTempString  str,
EQuoted  quoted = eQuoted 
)
static

Discard C-style backslash escapes.

Parameters
strThe original string to parse.
quotedDefine that parsing string is quoted or not. If parameter "quoted" equal eQuoted and string is not started and finished with a double-quote, the exception will be thrown, otherwise quotes will be removed in result.
Returns
String with parsed C-style escape sequences.
See also
CEncode

Definition at line 3981 of file ncbistr.cpp.

Referenced by s_DecodeMetadataValue().

◆ CParseTemplException() [1/4]

template<class TBase >
CParseTemplException< TBase >::CParseTemplException ( const CDiagCompileInfo info,
const CException prev_exception,
const string message,
string::size_type  pos,
EDiagSev  severity,
CException::TFlags  flags 
)
inlineprotected

Definition at line 4466 of file ncbistr.hpp.

◆ CParseTemplException() [2/4]

template<class TBase >
CParseTemplException< TBase >::CParseTemplException ( const CDiagCompileInfo info,
const CException prev_exception,
EErrCode  err_code,
const string message,
string::size_type  pos,
EDiagSev  severity = eDiag_Error 
)
inline

Constructor.

Report "pos" along with "what".

Definition at line 4416 of file ncbistr.hpp.

◆ CParseTemplException() [3/4]

template<class TBase >
CParseTemplException< TBase >::CParseTemplException ( const CParseTemplException< TBase > &  other)
inline

Constructor.

Definition at line 4431 of file ncbistr.hpp.

◆ CParseTemplException() [4/4]

template<class TBase >
CParseTemplException< TBase >::CParseTemplException ( void  )
inlineprotected

Constructor.

Examples
/home/coremake/doxygen/cxx/include/corelib/ncbistr.hpp.

Definition at line 4479 of file ncbistr.hpp.

◆ CStringDecoder_Url()

CStringDecoder_Url::CStringDecoder_Url ( NStr::EUrlDecode  flag = NStr::eUrlDec_All)

Definition at line 7271 of file ncbistr.cpp.

◆ CStringEncoder_Url()

CStringEncoder_Url::CStringEncoder_Url ( NStr::EUrlEncode  flag = NStr::eUrlEnc_SkipMarkChars)

Definition at line 7284 of file ncbistr.cpp.

References CStringDecoder_Url::m_Flag, and NStr::URLDecode().

◆ CStringPairs() [1/3]

template<class TContainer >
CStringPairs< TContainer >::CStringPairs ( const CTempString  arg_sep,
const CTempString  val_sep,
IStringDecoder decoder = NULL,
EOwnership  own_decoder = eTakeOwnership,
IStringEncoder encoder = NULL,
EOwnership  own_encoder = eTakeOwnership 
)
inline

Create parser with the specified parameters.

Parameters
arg_sepSeparator between name+value pairs
val_sepSeparator between name and value
decoderString decoder (Url, Xml etc.)
own_decoderDecoder ownership flag
encoderString encoder (Url, Xml etc.)
own_encoderEncoder ownership flag

Definition at line 4636 of file ncbistr.hpp.

◆ CStringPairs() [2/3]

template<class TContainer >
CStringPairs< TContainer >::CStringPairs ( IStringDecoder decoder = NULL,
EOwnership  own_decoder = eTakeOwnership,
IStringEncoder encoder = NULL,
EOwnership  own_encoder = eTakeOwnership 
)
inline

Create parser with the specified decoder/encoder and default separators.

Parameters
decoderString decoder (Url, Xml etc.)
own_decoderDecoder ownership flag
decoderString encoder (Url, Xml etc.), optional
own_encoderEncoder ownership flag, optional
Examples
/home/coremake/doxygen/cxx/include/corelib/ncbistr.hpp.

Definition at line 4611 of file ncbistr.hpp.

◆ CStringPairs() [3/3]

template<class TContainer >
CStringPairs< TContainer >::CStringPairs ( NStr::EUrlDecode  decode_flag,
NStr::EUrlEncode  encode_flag 
)
inline

Create parser with the selected URL-encoding/decoding options and default separators.

Parameters
decode_flagURL-decoding flag
encode_flagURL-encoding flag

Definition at line 4656 of file ncbistr.hpp.

◆ CStrTokenize()

template<class TStr , class TV , class TP = CStrDummyTokenPos, class TCount = CStrDummyTokenCount, class TReserve = CStrDummyTargetReserve<TV, TP>>
CStrTokenize< TStr, TV, TP, TCount, TReserve >::CStrTokenize ( const TS