NCBI C++ ToolKit
|
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() |
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>(-1L) |
std::basic_string<> compatibility interface | |
CTempString & | CTempString::assign (const char *src_str, size_type len) |
Assign new values to the content of the a string. More... | |
CTempString & | CTempString::assign (const CTempString src_str) |
CTempString & | CTempString::assign (const CTempString src_str, size_type pos, size_type len) |
CTempString & | CTempString::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 |
#define _T_CSTRING | ( | x | ) | (x) |
Definition at line 182 of file ncbistr.hpp.
#define _T_STDSTRING | ( | x | ) | (x) |
Definition at line 180 of file ncbistr.hpp.
#define _T_XCSTRING | ( | x | ) | ncbi::impl_ToCString(x) |
Definition at line 181 of file ncbistr.hpp.
#define _T_XSTRING | ( | x | ) | (x) |
Definition at line 179 of file ncbistr.hpp.
#define _TX | ( | x | ) | x |
Definition at line 176 of file ncbistr.hpp.
#define kEmptyStr NcbiEmptyString |
Definition at line 123 of file ncbistr.hpp.
#define kEmptyWStr NcbiEmptyWString |
Definition at line 127 of file ncbistr.hpp.
#define kEmptyXCStr kEmptyCStr |
Definition at line 187 of file ncbistr.hpp.
#define kEmptyXStr kEmptyStr |
Definition at line 186 of file ncbistr.hpp.
#define NCBI_TEMPSTR_DESTROY_COPY | ( | ) |
Definition at line 294 of file tempstr.hpp.
#define NCBI_TEMPSTR_MAKE_COPY | ( | ) |
Definition at line 293 of file tempstr.hpp.
#define NCBI_TEXT | ( | x | ) | x |
Definition at line 55 of file ncbi_xstr.hpp.
#define NcbiEmptyCStr NCBI_NS_NCBI::kEmptyCStr |
Definition at line 59 of file ncbistr.hpp.
#define NcbiEmptyString NCBI_NS_NCBI::CNcbiEmptyString::Get() |
Definition at line 122 of file ncbistr.hpp.
#define NcbiEmptyWCStr NCBI_NS_NCBI::kEmptyWCStr |
Definition at line 63 of file ncbistr.hpp.
#define NcbiEmptyWString NCBI_NS_NCBI::CNcbiEmptyWString::Get() |
Definition at line 126 of file ncbistr.hpp.
#define NcbiEmptyXCStr NcbiEmptyCStr |
Definition at line 184 of file ncbistr.hpp.
#define NcbiEmptyXString NcbiEmptyString |
Definition at line 185 of file ncbistr.hpp.
#define NCBITOOLKIT_USE_LONG_UCS4 (SIZEOF_LONG == 4) |
Definition at line 3837 of file ncbistr.hpp.
#define NPOS NCBI_NS_STD::string::npos |
Definition at line 133 of file ncbistr.hpp.
typedef const char* CTempString::const_iterator |
Definition at line 71 of file tempstr.hpp.
Definition at line 4813 of file ncbistr.hpp.
typedef EStringToNumFlags NStr::EConvErrFlags |
Formerly split out.
Definition at line 310 of file ncbistr.hpp.
typedef PCase_Generic<string> PCase |
Definition at line 4880 of file ncbistr.hpp.
typedef PCase_Generic<const char *> PCase_CStr |
Definition at line 4881 of file ncbistr.hpp.
typedef PEqualNocase_Generic<string> PEqualNocase |
Definition at line 4977 of file ncbistr.hpp.
Definition at line 5009 of file ncbistr.hpp.
typedef PEqualNocase_Conditional_Generic<const char *> PEqualNocase_Conditional_CStr |
Definition at line 5010 of file ncbistr.hpp.
typedef PEqualNocase_Generic<const char *> PEqualNocase_CStr |
Definition at line 4978 of file ncbistr.hpp.
typedef PNocase_Generic<string> PNocase |
Definition at line 4910 of file ncbistr.hpp.
Definition at line 4952 of file ncbistr.hpp.
typedef PNocase_Conditional_Generic<const char *> PNocase_Conditional_CStr |
Definition at line 4953 of file ncbistr.hpp.
typedef PNocase_Generic<const char *> PNocase_CStr |
Definition at line 4911 of file ncbistr.hpp.
typedef NCBI_NS_STD::string::size_type SIZE_TYPE |
Definition at line 132 of file ncbistr.hpp.
typedef size_t CTempString::size_type |
Definition at line 70 of file tempstr.hpp.
Definition at line 1053 of file tempstr.hpp.
|
private |
Definition at line 1061 of file tempstr.hpp.
Type for character in UCS-2 encoding.
Definition at line 3849 of file ncbistr.hpp.
typedef TUnicodeSymbol TCharUCS4 |
Definition at line 3844 of file ncbistr.hpp.
typedef TV CStrTokenize< TStr, TV, TP, TCount, TReserve >::TContainer |
Definition at line 230 of file ncbistr_util.hpp.
typedef TStringToNumFlags NStr::TConvErrFlags |
Formerly split out.
Definition at line 312 of file ncbistr.hpp.
typedef TCount CStrTokenize< TStr, TV, TP, TCount, TReserve >::TCountTrait |
Definition at line 232 of file ncbistr_util.hpp.
|
private |
Definition at line 1062 of file tempstr.hpp.
typedef int NStr::TDedentFlags |
Bitwise OR of EDedentFlags.
Definition at line 3417 of file ncbistr.hpp.
typedef int CParseTemplException< TBase >::TErrCode |
Definition at line 4455 of file ncbistr.hpp.
Definition at line 142 of file ncbistr_util.hpp.
typedef int NStr::THtmlDecode |
Definition at line 3073 of file ncbistr.hpp.
typedef int NStr::THtmlEncode |
Definition at line 3057 of file ncbistr.hpp.
typedef int NStr::TNumToStringFlags |
Bitwise OR of "ENumToStringFlags".
Definition at line 266 of file ncbistr.hpp.
typedef TP CStrTokenize< TStr, TV, TP, TCount, TReserve >::TPosContainer |
Definition at line 231 of file ncbistr_util.hpp.
typedef int NStr::TPrintableMode |
Bitwise OR of EPrintableMode flags.
Definition at line 2738 of file ncbistr.hpp.
typedef TReserve CStrTokenize< TStr, TV, TP, TCount, TReserve >::TReserveTrait |
Definition at line 233 of file ncbistr_util.hpp.
typedef int NStr::TSplitFlags |
Bitwise OR of ESplitFlags.
Definition at line 2512 of file ncbistr.hpp.
typedef int NStr::TSS_Flags |
Bitwise OR of ESS_Flags.
Definition at line 2855 of file ncbistr.hpp.
typedef TStr CStrTokenize< TStr, TV, TP, TCount, TReserve >::TString |
Definition at line 229 of file ncbistr_util.hpp.
typedef vector<pair<string, string> > TStringPairsVector |
Definition at line 4812 of file ncbistr.hpp.
typedef int NStr::TStringToNumFlags |
Bitwise OR of "EStringToNumFlags".
Definition at line 311 of file ncbistr.hpp.
typedef basic_string<TCharUCS2> TStringUCS2 |
Type for string in UCS-2 encoding.
Definition at line 3851 of file ncbistr.hpp.
typedef TStringUnicode TStringUCS4 |
Definition at line 3845 of file ncbistr.hpp.
typedef basic_string<TUnicodeSymbol> TStringUnicode |
Unicode string.
Definition at line 143 of file ncbistr.hpp.
typedef TContainer::value_type CStringPairs< TContainer >::TStrPair |
The container's value type must be pair<string, string> or a compatible type.
Definition at line 4601 of file ncbistr.hpp.
typedef TContainer CStringPairs< TContainer >::TStrPairs |
Definition at line 4598 of file ncbistr.hpp.
typedef Uint4 TUnicodeSymbol |
Unicode character.
Definition at line 141 of file ncbistr.hpp.
typedef int NStr::TWrapFlags |
Bitwise OR of "EWrapFlags".
Definition at line 3234 of file ncbistr.hpp.
typedef char TXChar |
Definition at line 172 of file ncbistr.hpp.
typedef int NStr::TXmlEncode |
Definition at line 3039 of file ncbistr.hpp.
Definition at line 173 of file ncbistr.hpp.
typedef char CTempString::value_type |
Definition at line 69 of file tempstr.hpp.
enum XStr::ECase |
Enumerator | |
---|---|
eCase | Case sensitive compare. |
eNocase | Case insensitive compare. |
Definition at line 222 of file ncbi_xstr.hpp.
enum NStr::ECase |
Which type of string comparison.
Enumerator | |
---|---|
eCase | Case sensitive compare. |
eNocase | Case insensitive compare. |
Definition at line 1204 of file ncbistr.hpp.
enum NStr::EDedentFlags |
Flags for Dedent() method.
Definition at line 3409 of file ncbistr.hpp.
enum NStr::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.
enum EEncoding |
Definition at line 199 of file ncbistr.hpp.
enum CParseTemplException::EErrCode |
Error types that for exception class.
Enumerator | |
---|---|
eErr | Generic error. |
Definition at line 4402 of file ncbistr.hpp.
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 4511 of file ncbistr.hpp.
enum NStr::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.
Definition at line 2940 of file ncbistr.hpp.
enum NStr::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 3068 of file ncbistr.hpp.
enum NStr::EHtmlEncode |
HTML-decode flags.
Definition at line 3049 of file ncbistr.hpp.
enum NStr::EJsonEncode |
Json-encode flags.
Enumerator | |
---|---|
eJsonEnc_UTF8 | Encode all characters above 0x80 to \uXXXX form. |
eJsonEnc_Quoted | Quote resulting string. Keep all Unicode symbols as is. https://tools.ietf.org/html/rfc7159#section-7 |
Definition at line 3093 of file ncbistr.hpp.
enum NStr::EMergeDelims |
Whether to merge adjacent delimiters.
Used by some methods that don't need full functionality of ESplitFlags.
Enumerator | |
---|---|
eMergeDelims | |
eNoMergeDelims |
Definition at line 2516 of file ncbistr.hpp.
enum ENcbiStrings |
Enumerator | |
---|---|
eNcbiStrings_Stat | |
eNcbiStrings_PHID |
Definition at line 54 of file ncbi_strings.h.
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.
enum NStr::EOccurrence |
Whether it is the first or last occurrence.
Enumerator | |
---|---|
eFirst | First occurrence. |
eLast | Last occurrence. |
Definition at line 1939 of file ncbistr.hpp.
enum NStr::EPrintableMode |
How to display printable strings.
Assists in making a printable version of "str".
Definition at line 2729 of file ncbistr.hpp.
enum NStr::EQuoted |
Define that string is quoted or not.
Enumerator | |
---|---|
eQuoted | String is quoted. |
eNotQuoted | String is not quoted. |
Definition at line 2989 of file ncbistr.hpp.
enum NStr::ESplitFlags |
Flags for Split*() methods.
Definition at line 2499 of file ncbistr.hpp.
enum NStr::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 3168 of file ncbistr.hpp.
enum NStr::ESS_Flags |
Flags for Sanitize().
Definition at line 2835 of file ncbistr.hpp.
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 whitespace characters in converted string. |
fAllowLeadingSymbols | Ignore leading non-numeric characters. |
fAllowTrailingSpaces | Ignore trailing whitespace 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.
enum NStr::ETrunc |
Which end to truncate a string.
Enumerator | |
---|---|
eTrunc_Begin | Truncate leading whitespace only. |
eTrunc_End | Truncate trailing whitespace only. |
eTrunc_Both | Truncate whitespace at both begin and end of string. |
Definition at line 2239 of file ncbistr.hpp.
enum NStr::EUrlDecode |
URL decode flags.
Enumerator | |
---|---|
eUrlDec_All | Decode '+' to space. |
eUrlDec_Percent | Decode only XX. |
Definition at line 3159 of file ncbistr.hpp.
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 3143 of file ncbistr.hpp.
enum CUtf8::EValidate |
How to verify character encoding of the source data.
Enumerator | |
---|---|
eNoValidate | |
eValidate |
Definition at line 3878 of file ncbistr.hpp.
enum NStr::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 3229 of file ncbistr.hpp.
enum NStr::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. |
eXmlEnc_Unsafe_Throw |
Definition at line 3027 of file ncbistr.hpp.
Enumerator | |
---|---|
eNoZeroAtEnd | For compatibility with older code. |
eHasZeroAtEnd |
Definition at line 913 of file tempstr.hpp.
|
inline |
Definition at line 120 of file ncbistr_util.hpp.
References CTempStringList::m_FirstNode, CTempStringList::m_LastNode, CTempStringList::SNode::next, NULL, and CTempStringList::SNode::str.
|
inline |
Definition at line 79 of file text_joiner.hpp.
References ERR_POST_XX_ONCE, NULL, and Warning().
Referenced by CDefLineJoiner::Add(), CDefLineJoiner::ReplaceAndAdd(), CDeflineGenerator::x_SetTitleFromNM(), CDeflineGenerator::x_SetTitleFromPatent(), and CDeflineGenerator::x_SetTitleFromPDB().
|
inline |
Return TRUE if it found some text and put it into collector.
The collector can have empty strings, even if function returns FALSE.
Definition at line 156 of file ncbistr_util.hpp.
References NULL.
Referenced by CStringTokenCount::Count(), and CStrTokenize< TStr, TV, TP, TCount, TReserve >::Do().
bool CStrTokenizeBase::Advance | ( | CTempStringList * | part_collector, |
SIZE_TYPE * | ptr_part_start, | ||
SIZE_TYPE * | ptr_delim_pos | ||
) |
Definition at line 7410 of file ncbistr.cpp.
char * CTempString_Storage::Allocate | ( | CTempString::size_type | len | ) |
Definition at line 7403 of file ncbistr.cpp.
|
inlinevirtual |
Implements NStr::IWrapDest.
Definition at line 3288 of file ncbistr.hpp.
References CTempString::data(), CTempString::length(), NStr::CWrapDestStringList::m_list, and NcbiEmptyString.
|
pure virtual |
Implemented in CGenbankFormatterWrapDest, and NStr::CWrapDestStringList.
Implements NStr::IWrapDest.
Definition at line 3284 of file ncbistr.hpp.
References NStr::CWrapDestStringList::m_list.
Implemented in CGenbankFormatterWrapDest, and NStr::CWrapDestStringList.
|
inlinestatic |
Convert non-Unicode character into UTF8 and append it to existing string.
dest | Existing UTF8 string |
ch | Character |
lcl | Character locale return reference to modified dest string |
Definition at line 4060 of file ncbistr.hpp.
References CUtf8::x_Append().
|
inlinestatic |
Convert non-Unicode character into UTF8 and append it to existing string.
dest | Existing UTF8 string |
ch | Character |
encoding | Character encoding |
validate | Verify the character encoding of the source return reference to modified dest string |
Definition at line 4041 of file ncbistr.hpp.
References validate(), and CUtf8::x_Append().
|
inlinestatic |
Convert Unicode C++ string into UTF8 and append it to existing string.
dest | Existing UTF8 string |
src | Source Unicode string return reference to modified dest string |
Definition at line 3952 of file ncbistr.hpp.
References CUtf8::x_Append().
|
inlinestatic |
Convert non-Unicode C++ string into UTF8 and append it to existing string.
dest | Existing UTF8 string |
src | Source string |
lcl | Source string locale return reference to modified dest string |
Definition at line 4021 of file ncbistr.hpp.
References CUtf8::x_Append().
|
inlinestatic |
Convert non-Unicode C++ string into UTF8 and append it to existing string.
dest | Existing UTF8 string |
src | Source string |
encoding | Character encoding of the source string |
validate | Verify the character encoding of the source return reference to modified dest string |
Definition at line 4002 of file ncbistr.hpp.
References validate(), and CUtf8::x_Append().
|
inlinestatic |
Convert Unicode character buffer into UTF8 and append it to existing string.
dest | Existing UTF8 string |
src | Source Unicode character buffer |
tchar_count | Number 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 3970 of file ncbistr.hpp.
References CUtf8::x_Append().
|
inlinestatic |
Convert Unicode symbol into UTF8 and append it to existing string.
dest | Existing UTF8 string |
ch | Unicode symbol return reference to modified dest string |
Definition at line 3985 of file ncbistr.hpp.
References CUtf8::x_Append().
|
inlinestatic |
Definition at line 4117 of file ncbistr.hpp.
References CUtf8::eNoValidate.
|
inlinestatic |
Convert UTF8 string into Unicode.
Can throw a CStringException if the conversion is impossible or the string has invalid UTF-8 encoding.
src | Source UTF8 string |
substitute_on_error | If the conversion is impossible, append the provided string or, if substitute_on_error equals 0, throw an exception |
validate | Verify UTF8 character encoding of the source |
Definition at line 4110 of file ncbistr.hpp.
References validate(), and CUtf8::x_AsBasicString().
|
inline |
Assign new values to the content of the a string.
Definition at line 733 of file tempstr.hpp.
References len, CTempString::m_Length, CTempString::m_String, NCBI_TEMPSTR_DESTROY_COPY, and NCBI_TEMPSTR_MAKE_COPY.
Referenced by SAccGuide::AddRule(), CTempStringEx::assign(), CTL_Cmd::AssignCmdParam(), CGRPCServerCallbacks::BeginRequest(), CGapsEditor::ConvertNs2Gaps(), CExtraEncoder::Encode(), CDB_String::GetBulkInsertionData(), CBamHeader::GetSBamRecords(), CDBParamVariant::MakeName(), CDBParamVariant::MakePlainName(), CAttrListParser::NextAttribute(), CTempString::operator=(), SHTTP_StatusData::Parse(), CNetServProtoParserBase::ParseCommand(), CPrintJobInfo::PrintXput(), CSrvSocketTask::ReadLine(), CRegexpUtil::Replace(), s_ParseFuncName(), CNCBlobKeyLight::UnpackBlobKey(), ICitationBase::x_GetLabelV1(), CPubseqGatewayApp::x_GetParam(), CNetServProtoParserBase::x_GetToken(), and CFastaOstream::x_WriteSequence().
|
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().
|
inline |
Definition at line 976 of file tempstr.hpp.
References CTempString::assign(), len, CTempStringEx::m_ZeroAtEnd, and str().
|
inline |
Definition at line 983 of file tempstr.hpp.
References CTempString::assign(), CTempStringEx::eNoZeroAtEnd, CTempStringEx::m_ZeroAtEnd, and str().
|
inline |
Definition at line 744 of file tempstr.hpp.
References CTempString::m_Length, CTempString::m_String, NCBI_TEMPSTR_DESTROY_COPY, and NCBI_TEMPSTR_MAKE_COPY.
|
inline |
Definition at line 757 of file tempstr.hpp.
References CTempString::data(), len, NCBI_TEMPSTR_DESTROY_COPY, NCBI_TEMPSTR_MAKE_COPY, CTempString::size(), and CTempString::x_Init().
|
inline |
Definition at line 993 of file tempstr.hpp.
References CTempString::assign(), count, CTempStringEx::eNoZeroAtEnd, CTempStringEx::m_ZeroAtEnd, and str().
|
inline |
Definition at line 989 of file tempstr.hpp.
References str().
|
static |
Definition at line 6991 of file ncbistr.cpp.
|
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.
src | Source UTF8 string |
encoding | Encoding of the result |
substitute_on_error | If the conversion is impossible, append the provided string or, if substitute_on_error equals 0, throw an exception |
validate | Verify UTF8 character encoding of the source |
Definition at line 6974 of file ncbistr.cpp.
Referenced by CField_type::GetDBLinkFieldFromUserObject(), CObjectIStreamXml::ReadString(), CSplitDblinkQuals::x_ConvertStrsToStrs(), x_MakeTSqlString(), CSplitDblinkQuals::x_SplitQuals(), and CWString::x_UTF8ToString().
|
inline |
Check equivalence of arguments using predicate.
Definition at line 5039 of file ncbistr.hpp.
Referenced by CCgiRequest::CalcChecksum(), FastStringToBool(), CCgiCookies::Find(), CAssemblyTermCompleter::GetNext(), CRNANameCompleter::GetNext(), CTaxonTextCompleter::GetNext(), CCgiRequest::GetRequestMethod(), CId_pat::Id_Match(), CNcbiCommand::IsRequested(), CCgiApplication::LogRequest(), CId_pat::Match(), PFindByName< T >::operator()(), CAssemblyTermCompleter::Start(), and CCgiRequest::x_ProcessInputStream().
|
inlinestatic |
Convert into UTF8 from a Unicode C++ string.
src | Source string |
Definition at line 3921 of file ncbistr.hpp.
References CUtf8::x_Append().
|
inlinestatic |
Convert into UTF8 from a C/C++ string.
src | Source string |
lcl | String locale |
Definition at line 3906 of file ncbistr.hpp.
References CUtf8::x_Append().
|
inlinestatic |
Convert into UTF8 from a C/C++ string.
src | Source string |
encoding | Character encoding of the source string |
validate | Verify the character encoding of the source |
Definition at line 3891 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(), CODBC_Connection::GetVersionString(), 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().
|
inlinestatic |
Convert into UTF8 from a Unicode character buffer.
src | Source character buffer |
tchar_count | Number of characters in the buffer; If it equals to NPOS, buffer is assumed to be zero-terminated |
Definition at line 3936 of file ncbistr.hpp.
References CUtf8::x_Append().
|
inline |
Definition at line 148 of file ncbistr_util.hpp.
References CStrTokenizeBase::m_Pos, and NPOS.
Referenced by CStringTokenCount::Count(), and CStrTokenize< TStr, TV, TP, TCount, TReserve >::Do().
|
static |
Base64-decode string.
str | The string to decode. |
Definition at line 6277 of file ncbistr.cpp.
Referenced by CPSG_NamedAnnotInfo::GetId2AnnotInfoList(), and SDataOnlyCopy::Process().
|
static |
Base64-encode string.
str | The string to encode. |
line_len | Specify a length for Base64-encoded lines. Default 0 mean no line breaks at all. |
Definition at line 6261 of file ncbistr.cpp.
Referenced by CJsonResponse::Fill(), ToJsonString(), CPSGS_CDDProcessor::x_SendAnnotInfo(), and CPSGS_SNPProcessor::x_SendAnnotInfo().
|
inline |
Return an iterator to the string's starting position.
Definition at line 299 of file tempstr.hpp.
References CTempString::m_String.
Referenced by BOOST_AUTO_TEST_CASE(), CEndpointKey::CEndpointKey(), CSeq_id::CheckLocalID(), CSourceModParser::CompareKeys(), CTempString::Copy(), CTempString::find(), CTempString::find_first_not_of(), CTempString::find_first_of(), CTempString::find_last_not_of(), CTempString::find_last_of(), CRemoveDbXrefTreeItemData::GetFunction(), CUtf8::GetValidBytesCount(), CForeignContaminationScreenReportReader::LoadFile(), CMemoryLineReader::operator*(), CBufferedLineReader::operator*(), CMemoryLineReader::operator++(), CBufferedLineReader::operator++(), CWigBufferedLineReader::operator++(), CMemoryLineReader::PeekChar(), CBufferedLineReader::PeekChar(), CTempString::rfind(), sGetPrefixLength(), sSetLocusLineOffsets(), CGff2Record::TokenizeGFF(), CMemoryLineReader::UngetLine(), CBufferedLineReader::UngetLine(), CWigBufferedLineReader::UngetLine(), CDB_Numeric::x_MakeFromString(), CFeatureTableReader_Imp::x_TokenizeLenient(), and CFeatureTableReader_Imp::x_TokenizeStrict().
Convert bool to string.
value | Boolean value to be converted. |
Definition at line 2806 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().
|
static |
Encode a string for C/C++.
str | The string to be parsed. |
quoted | Define, to |
Definition at line 3958 of file ncbistr.cpp.
Referenced by CEndpointKey::CEndpointKey(), s_EncodeMetadataValue(), and CTL_LangCmd::x_GetDynamicID().
CEncodedString::CEncodedString | ( | const CTempString | s, |
NStr::EUrlEncode | flag = NStr::eUrlEnc_SkipMarkChars |
||
) |
Definition at line 7291 of file ncbistr.cpp.
|
inline |
Definition at line 4827 of file ncbistr.hpp.
|
static |
Convert encoded character into Unicode.
ch | Encoded character |
lcl | Character locale |
Definition at line 6926 of file ncbistr.cpp.
|
static |
Convert encoded character into Unicode.
ch | Encoded character |
encoding | Character encoding |
Definition at line 6830 of file ncbistr.cpp.
Referenced by CObjectIStreamJson::ReadEncodedChar(), s_SetPrimitiveData(), CObjectOStreamXml::WriteEncodedChar(), and CObjectIStreamXml::x_ReadEncodedChar().
|
inline |
Definition at line 132 of file ncbistr_util.hpp.
References CTempString::clear(), CTempStringList::m_FirstNode, CTempStringList::m_LastNode, CTempStringList::SNode::next, NULL, and CTempStringList::SNode::str.
Referenced by CStrTokenize< TStr, TV, TP, TCount, TReserve >::Do().
|
inline |
Clears the string.
Definition at line 351 of file tempstr.hpp.
References CTempString::m_Length, CTempString::m_String, NCBI_TEMPSTR_DESTROY_COPY, and NCBI_TEMPSTR_MAKE_COPY.
Referenced by SAccGuide::AddRule(), CBioseqIndex::CBioseqIndex(), SHTTP_StatusData::Clear(), CTempStringList::Clear(), CTempStringEx::clear(), CNCBlobKeyLight::Clear(), CDB_String::GetBulkInsertionData(), CAutoDefFeatureClause_Base::GetFeatureClausePhrases(), CMemorySrcFileMap::GetMods(), CCgiContext::GetSelfURL(), CForeignContaminationScreenReportReader::LoadFile(), CNCActiveHandler::x_CleanCmdResources(), CTempString::x_Init(), CMemorySrcFileMap::x_RegisterLine(), CDeflineGenerator::x_SetFlags(), and CDeflineGenerator::x_SetFlagsIdx().
|
inline |
Clear value to an empty string.
Definition at line 1003 of file tempstr.hpp.
References CTempString::clear(), CTempStringEx::eHasZeroAtEnd, and CTempStringEx::m_ZeroAtEnd.
Referenced by CFeatureTableReader_Imp::ParseInitialFeatureLine(), CWig2tableApplication::x_TryGetDouble(), and CWig2tableApplication::x_TryGetDoubleSimple().
|
static |
Determine if the suffix of one string is the prefix of another.
s1 | String to be compared – operand 1. |
s2 | String to be compared – operand 2. |
Definition at line 3092 of file ncbistr.cpp.
|
inlinestatic |
Determine the common prefix of two strings.
s1 | String to be compared – operand 1. |
s2 | String to be compared – operand 2. |
Definition at line 5452 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().
|
inlinestatic |
Determine the common suffix of two strings.
s1 | String to be compared – operand 1. |
s2 | String to be compared – operand 2. |
Definition at line 5464 of file ncbistr.hpp.
References i, CTempString::length(), min(), and n.
Referenced by CDiff::Diff(), GetExtraAccession(), CDiffList::x_CleanupAndMerge_Equities(), and CDiff::x_DiffHalfMatchI().
|
inlinestatic |
Definition at line 375 of file ncbi_xstr.hpp.
References XStr::CompareCase(), XStr::CompareNocase(), and XStr::eCase.
|
inlinestatic |
Definition at line 387 of file ncbi_xstr.hpp.
References XStr::CompareCase(), XStr::CompareNocase(), and XStr::eCase.
|
inlinestatic |
Definition at line 290 of file ncbi_xstr.hpp.
References XStr::CompareCase(), XStr::CompareNocase(), XStr::eCase, n, and str().
|
inlinestatic |
Definition at line 303 of file ncbi_xstr.hpp.
References XStr::CompareCase(), XStr::CompareNocase(), XStr::eCase, n, and str().
|
inlinestatic |
Definition at line 369 of file ncbi_xstr.hpp.
References XStr::CompareCase(), XStr::CompareNocase(), and XStr::eCase.
|
inlinestatic |
Definition at line 381 of file ncbi_xstr.hpp.
References XStr::CompareCase(), XStr::CompareNocase(), and XStr::eCase.
|
inlinestatic |
Definition at line 284 of file ncbi_xstr.hpp.
References XStr::CompareCase(), XStr::CompareNocase(), XStr::eCase, n, and str().
|
inlinestatic |
Definition at line 297 of file ncbi_xstr.hpp.
References XStr::CompareCase(), XStr::CompareNocase(), XStr::eCase, n, and str().
Compare two strings – char* version.
s1 | String to be compared – operand 1. |
s2 | String to be compared – operand 2. |
use_case | Whether to do a case sensitive compare(default is eCase), or a case-insensitive compare (eNocase). |
Definition at line 5315 of file ncbistr.hpp.
References NStr::CompareCase(), NStr::CompareNocase(), and NStr::eCase.
|
inlinestatic |
Compare of a substring with another string.
s1 | String containing the substring to be compared. |
pos | Start position of substring to be compared. |
n | Number of characters in substring to be compared. |
s2 | String (char*) to be compared with substring. |
use_case | Whether to do a case sensitive compare(eCase – default), or a case-insensitive compare (eNocase). |
Definition at line 5299 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(), CLatLonMap_Base::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().
|
inlinestatic |
Compare of a substring with another string.
s1 | String containing the substring to be compared. |
pos | Start position of substring to be compared. |
n | Number of characters in substring to be compared. |
s2 | String to be compared with substring. |
use_case | Whether to do a case sensitive compare(default is eCase), or a case-insensitive compare (eNocase). |
Definition at line 5307 of file ncbistr.hpp.
References NStr::CompareCase(), NStr::CompareNocase(), NStr::eCase, n, and CTempString::substr().
|
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>().
|
inlinestatic |
Compare two strings – CTempStringEx version.
s1 | String to be compared – operand 1. |
s2 | String to be compared – operand 2. |
use_case | Whether to do a case sensitive compare(default is eCase), or a case-insensitive compare (eNocase). |
Definition at line 5321 of file ncbistr.hpp.
References NStr::CompareCase(), NStr::CompareNocase(), and NStr::eCase.
Return difference between "s1" and "s2".
Definition at line 5786 of file ncbistr.hpp.
References NStr::Compare(), and NStr::eCase.
Return difference between "s1" and "s2".
Definition at line 5821 of file ncbistr.hpp.
References NStr::Compare(), and NStr::eNocase.
Referenced by CDbtag::Compare(), CObject_id::Compare(), and CHttpCookie::sx_Compare().
|
inline |
Return difference between "s1" and "s2".
Definition at line 5859 of file ncbistr.hpp.
References NStr::Compare().
|
inlinestatic |
Definition at line 339 of file ncbi_xstr.hpp.
References XStr::strcmp().
|
inlinestatic |
Definition at line 236 of file ncbi_xstr.hpp.
|
inlinestatic |
Definition at line 249 of file ncbi_xstr.hpp.
|
inlinestatic |
Definition at line 345 of file ncbi_xstr.hpp.
References XStr::strcmp().
|
inlinestatic |
Definition at line 230 of file ncbi_xstr.hpp.
Referenced by XStr::Compare().
|
inlinestatic |
Definition at line 243 of file ncbi_xstr.hpp.
Case-sensitive compare of two strings – char* version.
s1 | String to be compared – operand 1. |
s2 | String to be compared – operand 2. |
Definition at line 5287 of file ncbistr.hpp.
References NStr::strcmp().
Case-sensitive compare of a substring with another string.
s1 | String containing the substring to be compared. |
pos | Start position of substring to be compared. |
n | Number of characters in substring to be compared. |
s2 | String (char*) to be compared with substring. |
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(), CTar::x_ProcessEntry(), CBioseqContext::x_SetId(), and CSortedProteins::x_SortProteinNames().
|
static |
Case-sensitive compare of a substring with another string.
s1 | String containing the substring to be compared. |
pos | Start position of substring to be compared. |
n | Number of characters in substring to be compared. |
s2 | String to be compared with substring. |
Definition at line 158 of file ncbistr.cpp.
References CTempString::data(), CTempString::empty(), CTempString::length(), n, and NPOS.
|
static |
Case-sensitive compare of two strings – CTempStringEx version.
s1 | String to be compared – operand 1. |
s2 | String to be compared – operand 2. |
Definition at line 118 of file ncbistr.cpp.
References CTempString::data(), CTempString::length(), and min().
|
inline |
Definition at line 149 of file ncbi_xstr.hpp.
References CTempXStr< _TChar >::data(), CTempXStr< _TChar >::length(), n, and CTempXStr< _TChar >::operator[]().
Referenced by XStr::strcmp(), and XStr::strncmp().
|
inlinestatic |
Definition at line 354 of file ncbi_xstr.hpp.
References XStr::strcasecmp().
|
inlinestatic |
Definition at line 263 of file ncbi_xstr.hpp.
References CTempXStr< _TChar >::CompareNocase(), n, and str().
|
inlinestatic |
Definition at line 276 of file ncbi_xstr.hpp.
References CTempXStr< _TChar >::CompareNocase(), n, and str().
|
inlinestatic |
Definition at line 360 of file ncbi_xstr.hpp.
References XStr::strcasecmp().
|
inlinestatic |
Definition at line 257 of file ncbi_xstr.hpp.
References CTempXStr< _TChar >::CompareNocase(), n, and str().
Referenced by XStr::Compare().
|
inlinestatic |
Definition at line 270 of file ncbi_xstr.hpp.
References CTempXStr< _TChar >::CompareNocase(), n, and str().
Case-insensitive compare of two strings – char* version.
s1 | String to be compared – operand 1. |
s2 | String to be compared – operand 2. |
Definition at line 5293 of file ncbistr.hpp.
References NStr::strcasecmp().
|
static |
Case-insensitive compare of a substring with another string.
s1 | String containing the substring to be compared. |
pos | Start position of substring to be compared. |
n | Number of characters in substring to be compared. |
s2 | String (char*) to be compared with substring. |
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(), CLatLonMap_Base::s_CompareTwoLinesByCountry(), CLatLonMap_Base::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(), 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(), CLatLonMap_Base::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(), CTar::x_ProcessEntry(), 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().
|
static |
Case-insensitive compare of a substring with another string.
s1 | String containing the substring to be compared. |
pos | Start position of substring to be compared. |
n | Number of characters in substring to be compared. |
s2 | String to be compared with substring. |
Definition at line 248 of file ncbistr.cpp.
References CTempString::data(), CTempString::empty(), CTempString::length(), n, NPOS, and tolower().
|
static |
Case-insensitive compare of two strings – CTempStringEx version.
s1 | String to be compared – operand 1. |
s2 | String to be compared – operand 2. |
Definition at line 190 of file ncbistr.cpp.
References CTempString::data(), CTempString::length(), min(), n, and tolower().
|
inline |
Definition at line 168 of file ncbi_xstr.hpp.
References CT_TOLOWER, CTempXStr< _TChar >::data(), CTempXStr< _TChar >::length(), locale, and n.
Referenced by XStr::CompareNocase(), XStr::strcasecmp(), and XStr::strncasecmp().
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().
|
inlinestatic |
Definition at line 66 of file ncbistr_util.hpp.
|
inlinestatic |
Definition at line 330 of file ncbistr_util.hpp.
References CStrTokenizeBase::Advance(), CStrTokenizeBase::AtEnd(), and NULL.
|
static |
Discard C-style backslash escapes.
str | The original string to parse. |
quoted | Define 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. |
Definition at line 3972 of file ncbistr.cpp.
Referenced by s_DecodeMetadataValue().
|
inlineprotected |
Definition at line 4468 of file ncbistr.hpp.
|
inline |
|
inline |
Constructor.
Definition at line 4433 of file ncbistr.hpp.
|
inlineprotected |
Constructor.
Definition at line 4481 of file ncbistr.hpp.
CStringDecoder_Url::CStringDecoder_Url | ( | NStr::EUrlDecode | flag = NStr::eUrlDec_All | ) |
Definition at line 7262 of file ncbistr.cpp.
CStringEncoder_Url::CStringEncoder_Url | ( | NStr::EUrlEncode | flag = NStr::eUrlEnc_SkipMarkChars | ) |
Definition at line 7275 of file ncbistr.cpp.
References CStringDecoder_Url::m_Flag, and NStr::URLDecode().
|
inline |
Create parser with the specified parameters.
arg_sep | Separator between name+value pairs |
val_sep | Separator between name and value |
decoder | String decoder (Url, Xml etc.) |
own_decoder | Decoder ownership flag |
encoder | String encoder (Url, Xml etc.) |
own_encoder | Encoder ownership flag |
Definition at line 4638 of file ncbistr.hpp.
|
inline |
Create parser with the specified decoder/encoder and default separators.
decoder | String decoder (Url, Xml etc.) |
own_decoder | Decoder ownership flag |
decoder | String encoder (Url, Xml etc.), optional |
own_encoder | Encoder ownership flag, optional |
Definition at line 4613 of file ncbistr.hpp.
|
inline |
Create parser with the selected URL-encoding/decoding options and default separators.
decode_flag | URL-decoding flag |
encode_flag | URL-encoding flag |
Definition at line 4658 of file ncbistr.hpp.
|
inline |
Constructor.
str | String to be tokenized. |
delim | Set of char delimiters used to tokenize string "str". If delimiter is empty, then input string is appended to "arr" as is. |