NCBI C++ ToolKit
|
#include <ncbi_pch.hpp>
#include <ctools/ctransition/ncbistr.hpp>
#include <ctools/ctransition/ncbimem.hpp>
Go to the source code of this file.
Go to the SVN repository for this file.
Macros | |
#define | NEWLINE '\n' |
#define | SPACE ' ' |
#define | MAX_NO_DASH 2 |
#define | MIN_LEAD 3 |
#define | MIN_TAIL 1 |
#define | SPACE ' ' |
#define MAX_NO_DASH 2 |
Definition at line 1748 of file ct_ncbistr.cpp.
#define MIN_LEAD 3 |
Definition at line 1749 of file ct_ncbistr.cpp.
#define MIN_TAIL 1 |
Definition at line 1750 of file ct_ncbistr.cpp.
#define NEWLINE '\n' |
Definition at line 1167 of file ct_ncbistr.cpp.
#define SPACE ' ' |
Definition at line 1752 of file ct_ncbistr.cpp.
#define SPACE ' ' |
Definition at line 1752 of file ct_ncbistr.cpp.
NLM_EXTERN Nlm_Int4 LIBCALL BreakString | ( | char FAR * | theString, |
Nlm_CharPtr PNTR | Words | ||
) |
Definition at line 1654 of file ct_ncbistr.cpp.
References SkipSpaces(), SkipToSpace(), StrCpyPtr(), and Words.
Definition at line 1774 of file ct_ncbistr.cpp.
References ch0, ch1, and IS_WHITESP.
Referenced by Nlm_stream2text().
NLM_EXTERN void LIBCALL CleanSpaces | ( | char FAR * | Line | ) |
Definition at line 1562 of file ct_ncbistr.cpp.
References FALSE, isspace(), NEWLINE, NULLB, SkipSpaces(), SPACE, and TRUE.
NLM_EXTERN Nlm_Int4 LIBCALL CountChar | ( | char FAR * | theString, |
char | Char | ||
) |
Definition at line 1482 of file ct_ncbistr.cpp.
NLM_EXTERN Nlm_Int4 LIBCALL CountSet | ( | char FAR * | theString, |
char FAR * | Set | ||
) |
Definition at line 1516 of file ct_ncbistr.cpp.
NLM_EXTERN Nlm_Int4 LIBCALL CountStrings | ( | char FAR * | theString, |
char FAR * | Find | ||
) |
Definition at line 1495 of file ct_ncbistr.cpp.
References count, Len, Nlm_StringLen(), NULLB, and SkipToString().
NLM_EXTERN void LIBCALL DeleteChar | ( | char FAR * | theString, |
char | Delete | ||
) |
Definition at line 1675 of file ct_ncbistr.cpp.
References NULLB.
|
static |
Definition at line 49 of file ct_ncbistr.cpp.
References max(), Nlm_MemSet, and NULL.
Referenced by Nlm_StringCpy(), and Nlm_StringNCpy().
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_CompressSpaces | ( | Nlm_CharPtr | str | ) |
Definition at line 432 of file ct_ncbistr.cpp.
|
static |
Definition at line 538 of file ct_ncbistr.cpp.
References IS_DIGIT, len, NULL, and str().
Referenced by Nlm_NaturalStringCmpEx().
|
static |
Definition at line 784 of file ct_ncbistr.cpp.
References i, int, Nlm_StringLen(), NULL, str(), and TO_UPPER.
Referenced by Nlm_StringISearch(), and Nlm_StringSearch().
NLM_EXTERN Nlm_Uint4 LIBCALL Nlm_LabelCopy | ( | Nlm_CharPtr | to, |
Nlm_CharPtr | from, | ||
Nlm_Uint4 | buflen | ||
) |
Definition at line 1089 of file ct_ncbistr.cpp.
Referenced by Nlm_LabelCopyExtra(), and Nlm_LabelCopyNext().
NLM_EXTERN Nlm_Uint4 LIBCALL Nlm_LabelCopyExtra | ( | Nlm_CharPtr | to, |
Nlm_CharPtr | from, | ||
Nlm_Uint4 | buflen, | ||
Nlm_CharPtr | prefix, | ||
Nlm_CharPtr | suffix | ||
) |
Definition at line 1141 of file ct_ncbistr.cpp.
References len, Nlm_LabelCopy(), and NULL.
NLM_EXTERN void LIBCALL Nlm_LabelCopyNext | ( | Nlm_CharPtr PNTR | to, |
Nlm_CharPtr | from, | ||
Nlm_Uint4 PNTR | buflen | ||
) |
Definition at line 1119 of file ct_ncbistr.cpp.
References Nlm_LabelCopy().
NLM_EXTERN int LIBCALL Nlm_NaturalStringCmp | ( | Nlm_CharPtr | str1, |
Nlm_CharPtr | str2 | ||
) |
Definition at line 631 of file ct_ncbistr.cpp.
References FALSE, and Nlm_NaturalStringCmpEx().
|
static |
Definition at line 556 of file ct_ncbistr.cpp.
References ch1, ch2, IS_DIGIT, Nlm_DigitRunLength(), NULL, and TO_LOWER.
Referenced by Nlm_NaturalStringCmp(), and Nlm_NaturalStringICmp().
NLM_EXTERN int LIBCALL Nlm_NaturalStringICmp | ( | Nlm_CharPtr | str1, |
Nlm_CharPtr | str2 | ||
) |
Definition at line 637 of file ct_ncbistr.cpp.
References Nlm_NaturalStringCmpEx(), and TRUE.
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_rule_line | ( | const Nlm_Char FAR PNTR | str, |
size_t | len, | ||
enumRuleLine | method | ||
) |
Definition at line 1925 of file ct_ncbistr.cpp.
References _ASSERT, _TROUBLE, FAR, i, IS_WHITESP, len, Nlm_MemFree(), Nlm_MemNew(), Nlm_MemSet, Nlm_StringLen(), PNTR, RL_Center, RL_Left, RL_Right, RL_Spread, SPACE, str(), and x_memcpy().
Definition at line 483 of file ct_ncbistr.cpp.
References CHAR_BIT, cnt, DIM, and NULL.
Referenced by Nlm_StringCnt().
Definition at line 1870 of file ct_ncbistr.cpp.
References _ASSERT, can_break(), FAR, IS_ALPHA, IS_WHITESP, len, MAX_NO_DASH, MIN_LEAD, MIN_TAIL, Nlm_StringLen(), PNTR, and str().
Definition at line 222 of file ct_ncbistr.cpp.
References a, b, done, and TO_UPPER.
Referenced by Nlm_StringICmp().
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringCat | ( | char FAR * | to, |
const char FAR * | from | ||
) |
Definition at line 87 of file ct_ncbistr.cpp.
References StrCat.
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringChr | ( | const char FAR * | str, |
int | chr | ||
) |
Definition at line 117 of file ct_ncbistr.cpp.
References Nlm_StrChr, and str().
Definition at line 97 of file ct_ncbistr.cpp.
Definition at line 203 of file ct_ncbistr.cpp.
References Nlm_StrCnt(), and str().
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringCpy | ( | char FAR * | to, |
const char FAR * | from | ||
) |
Definition at line 63 of file ct_ncbistr.cpp.
References Nlm_ClearDestString(), and StrCpy.
Referenced by StringSubString().
Definition at line 132 of file ct_ncbistr.cpp.
References a, b, and Nlm_StrCSpn.
NLM_EXTERN Nlm_Boolean LIBCALL Nlm_StringDoesHaveText | ( | const char FAR * | str | ) |
Definition at line 386 of file ct_ncbistr.cpp.
References Nlm_StringHasNoText(), and str().
NLM_EXTERN Nlm_Boolean LIBCALL Nlm_StringHasNoText | ( | const char FAR * | str | ) |
Definition at line 375 of file ct_ncbistr.cpp.
References FALSE, str(), and TRUE.
Referenced by Nlm_StringDoesHaveText(), Nlm_StringIsAllDigits(), Nlm_StringIsAllLowerCase(), Nlm_StringIsAllPunctuation(), and Nlm_StringIsAllUpperCase().
Definition at line 107 of file ct_ncbistr.cpp.
References a, b, and Nlm_StrICmp().
NLM_EXTERN Nlm_Boolean Nlm_StringIsAllDigits | ( | Nlm_CharPtr | str | ) |
Definition at line 1003 of file ct_ncbistr.cpp.
References FALSE, IS_DIGIT, Nlm_StringHasNoText(), str(), and TRUE.
NLM_EXTERN Nlm_Boolean Nlm_StringIsAllLowerCase | ( | Nlm_CharPtr | str | ) |
Definition at line 1041 of file ct_ncbistr.cpp.
References FALSE, IS_ALPHA, IS_UPPER, Nlm_StringHasNoText(), str(), and TRUE.
NLM_EXTERN Nlm_Boolean Nlm_StringIsAllPunctuation | ( | Nlm_CharPtr | str | ) |
Definition at line 1060 of file ct_ncbistr.cpp.
References FALSE, Nlm_StringHasNoText(), NULL, str(), StringChr, and TRUE.
NLM_EXTERN Nlm_Boolean Nlm_StringIsAllUpperCase | ( | Nlm_CharPtr | str | ) |
Definition at line 1022 of file ct_ncbistr.cpp.
References FALSE, IS_ALPHA, IS_LOWER, Nlm_StringHasNoText(), str(), and TRUE.
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringISearch | ( | const char FAR * | str, |
const char FAR * | sub | ||
) |
Definition at line 843 of file ct_ncbistr.cpp.
References FALSE, Nlm_FindSubString(), and str().
NLM_EXTERN size_t LIBCALL Nlm_StringLen | ( | const char * | str | ) |
Definition at line 58 of file ct_ncbistr.cpp.
Referenced by CountStrings(), Nlm_FindSubString(), Nlm_rule_line(), Nlm_SearchSubString(), Nlm_SetupSubString(), Nlm_stream2text(), Nlm_StrSave(), Nlm_text2stream(), NoCaseSkipPastString(), SkipPastString(), and StringSubString().
NLM_EXTERN char* LIBCALL Nlm_StringLower | ( | char * | string | ) |
Definition at line 213 of file ct_ncbistr.cpp.
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringMove | ( | char FAR * | to, |
const char FAR * | from | ||
) |
Definition at line 188 of file ct_ncbistr.cpp.
References Nlm_StrMove().
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringNCat | ( | char FAR * | to, |
const char FAR * | from, | ||
size_t | max | ||
) |
Definition at line 92 of file ct_ncbistr.cpp.
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringNCpy | ( | char FAR * | to, |
const char FAR * | from, | ||
size_t | max | ||
) |
Definition at line 68 of file ct_ncbistr.cpp.
References max(), Nlm_ClearDestString(), and StrNCpy.
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringNCpy_0 | ( | char FAR * | to, |
const char FAR * | from, | ||
size_t | max | ||
) |
Definition at line 73 of file ct_ncbistr.cpp.
References max(), and StrNCat.
Referenced by Nlm_MemMapInit().
Definition at line 112 of file ct_ncbistr.cpp.
References a, b, max(), and Nlm_StrNICmp().
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringPBrk | ( | const char FAR * | a, |
const char FAR * | b | ||
) |
Definition at line 137 of file ct_ncbistr.cpp.
References a, b, and Nlm_StrPBrk.
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringPrintable | ( | const Nlm_Char PNTR | str, |
Nlm_Boolean | rn_eol | ||
) |
Definition at line 1692 of file ct_ncbistr.cpp.
References IS_PRINT, MGET_ERRPOST, Nlm_MemGet(), NULL, PNTR, and str().
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringRChr | ( | const char FAR * | str, |
int | chr | ||
) |
Definition at line 122 of file ct_ncbistr.cpp.
References Nlm_StrRChr, and str().
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringSave | ( | const char FAR * | from | ) |
Definition at line 193 of file ct_ncbistr.cpp.
References Nlm_StrSave().
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringSaveNoNull | ( | const char FAR * | from | ) |
Definition at line 198 of file ct_ncbistr.cpp.
References Nlm_StrSave().
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringSearch | ( | const char FAR * | str, |
const char FAR * | sub | ||
) |
Definition at line 837 of file ct_ncbistr.cpp.
References Nlm_FindSubString(), str(), and TRUE.
Definition at line 127 of file ct_ncbistr.cpp.
References a, b, and Nlm_StrSpn.
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringStr | ( | const char FAR * | str1, |
const char FAR * | str2 | ||
) |
Definition at line 142 of file ct_ncbistr.cpp.
References Nlm_StrStr.
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringTok | ( | char FAR * | str1, |
const char FAR * | str2 | ||
) |
Definition at line 147 of file ct_ncbistr.cpp.
References Nlm_StrTok.
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringTokMT | ( | char FAR * | str1, |
const char FAR * | str2, | ||
char FAR ** | tmp | ||
) |
Definition at line 152 of file ct_ncbistr.cpp.
NLM_EXTERN char* LIBCALL Nlm_StringUpper | ( | char * | string | ) |
Definition at line 208 of file ct_ncbistr.cpp.
NLM_EXTERN char* LIBCALL Nlm_StrLower | ( | char * | string | ) |
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StrMove | ( | char FAR * | to, |
const char FAR * | from | ||
) |
Definition at line 364 of file ct_ncbistr.cpp.
Referenced by Nlm_StringMove().
Definition at line 281 of file ct_ncbistr.cpp.
References a, b, done, max(), and TO_UPPER.
Referenced by Nlm_StringNICmp().
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StrSave | ( | const char FAR * | from | ) |
Definition at line 352 of file ct_ncbistr.cpp.
References FALSE, len, Nlm_MemCpy, Nlm_MemGet(), Nlm_StringLen(), and NULL.
Referenced by Nlm_StringSave(), and Nlm_StringSaveNoNull().
NLM_EXTERN char* LIBCALL Nlm_StrUpper | ( | char * | string | ) |
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_text2stream | ( | const Nlm_Char FAR PNTR | str | ) |
Definition at line 1822 of file ct_ncbistr.cpp.
References IS_ALPHA, IS_WHITESP, Nlm_MemNew(), Nlm_StringLen(), NULL, SPACE, and str().
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_TrimSpacesAroundString | ( | Nlm_CharPtr | str | ) |
Definition at line 391 of file ct_ncbistr.cpp.
NLM_EXTERN Nlm_CharPtr LIBCALL NoCaseSkipPastString | ( | char FAR * | theString, |
char FAR * | Find | ||
) |
Definition at line 1314 of file ct_ncbistr.cpp.
References Nlm_StringLen(), and SkipToString().
NLM_EXTERN Nlm_CharPtr LIBCALL NoCaseSkipToString | ( | char FAR * | theString, |
char FAR * | Find | ||
) |
Definition at line 1276 of file ct_ncbistr.cpp.
References toupper().
Definition at line 877 of file ct_ncbistr.cpp.
References IS_DIGIT, IS_WHITESP, Nlm_Uint8, result, str(), and UINT8_MAX.
Referenced by Nlm_StringToInt8(), and Nlm_StringToUint8().
Definition at line 956 of file ct_ncbistr.cpp.
References buf, i, str(), and rapidjson::value.
Referenced by Nlm_Int8ToString(), and Nlm_Uint8ToString().
NLM_EXTERN Nlm_CharPtr LIBCALL SkipChar | ( | char FAR * | theString, |
char | Char | ||
) |
Definition at line 1218 of file ct_ncbistr.cpp.
Referenced by CIStreamBuffer::GetInt4(), CIStreamBuffer::GetInt8(), CIStreamBuffer::GetUint4(), CIStreamBuffer::GetUint8(), CIStreamBuffer::ReadLine(), and CIStreamBuffer::SkipEndOfLine().
NLM_EXTERN Nlm_CharPtr LIBCALL SkipPastChar | ( | char FAR * | theString, |
char | Char | ||
) |
Definition at line 1237 of file ct_ncbistr.cpp.
NLM_EXTERN Nlm_CharPtr LIBCALL SkipPastString | ( | char FAR * | theString, |
char FAR * | Find | ||
) |
Definition at line 1302 of file ct_ncbistr.cpp.
References Nlm_StringLen(), and SkipToString().
NLM_EXTERN Nlm_CharPtr LIBCALL SkipSet | ( | char FAR * | theString, |
char FAR * | CharSet | ||
) |
Definition at line 1327 of file ct_ncbistr.cpp.
NLM_EXTERN Nlm_CharPtr LIBCALL SkipSpaces | ( | char FAR * | Line | ) |
Definition at line 1199 of file ct_ncbistr.cpp.
References isspace(), and NULLB.
Referenced by BreakString(), CleanSpaces(), and StripSpaces().
NLM_EXTERN Nlm_CharPtr LIBCALL SkipToChar | ( | char FAR * | theString, |
char | Char | ||
) |
Definition at line 1227 of file ct_ncbistr.cpp.
NLM_EXTERN Nlm_CharPtr LIBCALL SkipToSet | ( | char FAR * | theString, |
char FAR * | CharSet | ||
) |
Definition at line 1344 of file ct_ncbistr.cpp.
NLM_EXTERN Nlm_CharPtr LIBCALL SkipToSpace | ( | char FAR * | theString | ) |
NLM_EXTERN Nlm_CharPtr LIBCALL SkipToString | ( | char FAR * | theString, |
char FAR * | Find | ||
) |
Definition at line 1250 of file ct_ncbistr.cpp.
Referenced by CountStrings(), NoCaseSkipPastString(), and SkipPastString().
NLM_EXTERN Nlm_CharPtr LIBCALL StrCpyPtr | ( | char FAR * | Dest, |
char FAR * | Start, | ||
char FAR * | Stop | ||
) |
NLM_EXTERN Nlm_CharPtr LIBCALL StrDupPtr | ( | char FAR * | Start, |
char FAR * | Stop | ||
) |
Definition at line 1183 of file ct_ncbistr.cpp.
References MGET_ERRPOST, Nlm_MemGet(), and NULLB.
NLM_EXTERN Nlm_Int4 LIBCALL StringDiff | ( | char FAR * | This, |
char FAR * | That | ||
) |
Definition at line 1594 of file ct_ncbistr.cpp.
Definition at line 1613 of file ct_ncbistr.cpp.
NLM_EXTERN Nlm_CharPtr LIBCALL StringEnd | ( | char FAR * | theString | ) |
NLM_EXTERN Nlm_Boolean LIBCALL StringSub | ( | char FAR * | theString, |
char | Find, | ||
char | Replace | ||
) |
Definition at line 1362 of file ct_ncbistr.cpp.
NLM_EXTERN Nlm_Boolean LIBCALL StringSubSet | ( | char FAR * | theString, |
char FAR * | FindSet, | ||
char | Replace | ||
) |
Definition at line 1380 of file ct_ncbistr.cpp.
NLM_EXTERN Nlm_Boolean LIBCALL StringSubString | ( | char FAR * | theString, |
char FAR * | Find, | ||
char FAR * | Replace, | ||
Nlm_Int4 | MaxLength | ||
) |
Definition at line 1405 of file ct_ncbistr.cpp.
References FALSE, Len, MAX, MGET_ERRPOST, Nlm_MemFree(), Nlm_MemGet(), Nlm_StringCpy(), Nlm_StringLen(), NULLB, StringMove, and TRUE.
NLM_EXTERN Nlm_CharPtr LIBCALL StripSpaces | ( | char FAR * | Line | ) |
Definition at line 1544 of file ct_ncbistr.cpp.
References isspace(), NULLB, SkipSpaces(), and StringEnd().
NLM_EXTERN void LIBCALL TruncateString | ( | char FAR * | theString, |
Nlm_Int4 | Length | ||
) |
Definition at line 1634 of file ct_ncbistr.cpp.
References NULLB.
NLM_EXTERN Nlm_CharPtr LIBCALL TruncateStringCopy | ( | char FAR * | theString, |
Nlm_Int4 | Length | ||
) |
Definition at line 1642 of file ct_ncbistr.cpp.
Definition at line 1756 of file ct_ncbistr.cpp.
References _ASSERT, IS_WHITESP, n, and SPACE.
Referenced by Nlm_rule_line().