NCBI C++ ToolKit
Macros | Functions
ct_ncbistr.cpp File Reference
#include <ncbi_pch.hpp>
#include <ctools/ctransition/ncbistr.hpp>
#include <ctools/ctransition/ncbimem.hpp>
+ Include dependency graph for ct_ncbistr.cpp:

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   ' '
 

Functions

static BEGIN_CTRANSITION_SCOPE Nlm_CharPtr NEAR Nlm_ClearDestString (Nlm_CharPtr to, size_t max)
 
NLM_EXTERN size_t LIBCALL Nlm_StringLen (const char *str)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringCpy (char FAR *to, const char FAR *from)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringNCpy (char FAR *to, const char FAR *from, size_t max)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringNCpy_0 (char FAR *to, const char FAR *from, size_t max)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringCat (char FAR *to, const char FAR *from)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringNCat (char FAR *to, const char FAR *from, size_t max)
 
NLM_EXTERN int LIBCALL Nlm_StringCmp (const char FAR *a, const char FAR *b)
 
NLM_EXTERN int LIBCALL Nlm_StringNCmp (const char FAR *a, const char FAR *b, size_t max)
 
NLM_EXTERN int LIBCALL Nlm_StringICmp (const char FAR *a, const char FAR *b)
 
NLM_EXTERN int LIBCALL Nlm_StringNICmp (const char FAR *a, const char FAR *b, size_t max)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringChr (const char FAR *str, int chr)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringRChr (const char FAR *str, int chr)
 
NLM_EXTERN size_t LIBCALL Nlm_StringSpn (const char FAR *a, const char FAR *b)
 
NLM_EXTERN size_t LIBCALL Nlm_StringCSpn (const char FAR *a, const char FAR *b)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringPBrk (const char FAR *a, const char FAR *b)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringStr (const char FAR *str1, const char FAR *str2)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringTok (char FAR *str1, const char FAR *str2)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringTokMT (char FAR *str1, const char FAR *str2, char FAR **tmp)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringMove (char FAR *to, const char FAR *from)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringSave (const char FAR *from)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringSaveNoNull (const char FAR *from)
 
NLM_EXTERN size_t LIBCALL Nlm_StringCnt (const char FAR *str, const char FAR *x_list)
 
NLM_EXTERN char *LIBCALL Nlm_StringUpper (char *string)
 
NLM_EXTERN char *LIBCALL Nlm_StringLower (char *string)
 
NLM_EXTERN int LIBCALL Nlm_StrICmp (const char FAR *a, const char FAR *b)
 
NLM_EXTERN int LIBCALL Nlm_StrIPCmp (const char FAR *a, const char FAR *b)
 
NLM_EXTERN int LIBCALL Nlm_StrNICmp (const char FAR *a, const char FAR *b, size_t max)
 
NLM_EXTERN int LIBCALL Nlm_StrNIPCmp (const char FAR *a, const char FAR *b, size_t max)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StrSave (const char FAR *from)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StrMove (char FAR *to, const char FAR *from)
 
NLM_EXTERN Nlm_Boolean LIBCALL Nlm_StringHasNoText (const char FAR *str)
 
NLM_EXTERN Nlm_Boolean LIBCALL Nlm_StringDoesHaveText (const char FAR *str)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_TrimSpacesAroundString (Nlm_CharPtr str)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_CompressSpaces (Nlm_CharPtr str)
 
NLM_EXTERN size_t LIBCALL Nlm_StrCnt (const char FAR *s, const char FAR *x_list)
 
NLM_EXTERN char *LIBCALL Nlm_StrUpper (char *string)
 
NLM_EXTERN char *LIBCALL Nlm_StrLower (char *string)
 
static int Nlm_DigitRunLength (Nlm_CharPtr str)
 
static int LIBCALL Nlm_NaturalStringCmpEx (Nlm_CharPtr str1, Nlm_CharPtr str2, Nlm_Boolean caseInsensitive)
 
NLM_EXTERN int LIBCALL Nlm_NaturalStringCmp (Nlm_CharPtr str1, Nlm_CharPtr str2)
 
NLM_EXTERN int LIBCALL Nlm_NaturalStringICmp (Nlm_CharPtr str1, Nlm_CharPtr str2)
 
NLM_EXTERN Nlm_Int2 LIBCALL Nlm_MeshStringICmp (const char FAR *str1, const char FAR *str2)
 
NLM_EXTERN Nlm_Boolean Nlm_SetupSubString (const char FAR *sub, Nlm_Boolean caseCounts, Nlm_SubStringData PNTR data)
 
NLM_EXTERN Nlm_CharPtr Nlm_SearchSubString (const char FAR *str, Nlm_SubStringData PNTR data)
 
static Nlm_CharPtr Nlm_FindSubString (const char FAR *str, const char FAR *sub, Nlm_Boolean caseCounts)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringSearch (const char FAR *str, const char FAR *sub)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringISearch (const char FAR *str, const char FAR *sub)
 
NLM_EXTERN Nlm_Uint1Ptr LIBCALL Uint8ToBytes (Nlm_Uint8 value)
 
NLM_EXTERN Nlm_Uint8 LIBCALL BytesToUint8 (Nlm_Uint1Ptr bytes)
 
static Nlm_Uint8 s_StringToUint8 (const char *str, const char **endptr, int *sgn)
 
NLM_EXTERN Nlm_Uint8 LIBCALL Nlm_StringToUint8 (const char *str, const char **endptr)
 
NLM_EXTERN Nlm_Int8 LIBCALL Nlm_StringToInt8 (const char *str, const char **endptr)
 
static char * s_Uint8ToString (Nlm_Uint8 value, char *str, size_t str_size)
 
NLM_EXTERN char *LIBCALL Nlm_Uint8ToString (Nlm_Uint8 value, char *str, size_t str_size)
 
NLM_EXTERN char *LIBCALL Nlm_Int8ToString (Nlm_Int8 value, char *str, size_t str_size)
 
NLM_EXTERN Nlm_Boolean Nlm_StringIsAllDigits (Nlm_CharPtr str)
 
NLM_EXTERN Nlm_Boolean Nlm_StringIsAllUpperCase (Nlm_CharPtr str)
 
NLM_EXTERN Nlm_Boolean Nlm_StringIsAllLowerCase (Nlm_CharPtr str)
 
NLM_EXTERN Nlm_Boolean Nlm_StringIsAllPunctuation (Nlm_CharPtr str)
 
NLM_EXTERN Nlm_Uint4 LIBCALL Nlm_LabelCopy (Nlm_CharPtr to, Nlm_CharPtr from, Nlm_Uint4 buflen)
 
NLM_EXTERN void LIBCALL Nlm_LabelCopyNext (Nlm_CharPtr PNTR to, Nlm_CharPtr from, Nlm_Uint4 PNTR buflen)
 
NLM_EXTERN Nlm_Uint4 LIBCALL Nlm_LabelCopyExtra (Nlm_CharPtr to, Nlm_CharPtr from, Nlm_Uint4 buflen, Nlm_CharPtr prefix, Nlm_CharPtr suffix)
 
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)
 
NLM_EXTERN Nlm_CharPtr LIBCALL SkipSpaces (char FAR *Line)
 
NLM_EXTERN Nlm_CharPtr LIBCALL SkipToSpace (char FAR *theString)
 
NLM_EXTERN Nlm_CharPtr LIBCALL SkipChar (char FAR *theString, char Char)
 
NLM_EXTERN Nlm_CharPtr LIBCALL SkipToChar (char FAR *theString, char Char)
 
NLM_EXTERN Nlm_CharPtr LIBCALL SkipPastChar (char FAR *theString, char Char)
 
NLM_EXTERN Nlm_CharPtr LIBCALL SkipToString (char FAR *theString, char FAR *Find)
 
NLM_EXTERN Nlm_CharPtr LIBCALL NoCaseSkipToString (char FAR *theString, char FAR *Find)
 
NLM_EXTERN Nlm_CharPtr LIBCALL SkipPastString (char FAR *theString, char FAR *Find)
 
NLM_EXTERN Nlm_CharPtr LIBCALL NoCaseSkipPastString (char FAR *theString, char FAR *Find)
 
NLM_EXTERN Nlm_CharPtr LIBCALL SkipSet (char FAR *theString, char FAR *CharSet)
 
NLM_EXTERN Nlm_CharPtr LIBCALL SkipToSet (char FAR *theString, char FAR *CharSet)
 
NLM_EXTERN Nlm_Boolean LIBCALL StringSub (char FAR *theString, char Find, char Replace)
 
NLM_EXTERN Nlm_Boolean LIBCALL StringSubSet (char FAR *theString, char FAR *FindSet, char Replace)
 
NLM_EXTERN Nlm_Boolean LIBCALL StringSubString (char FAR *theString, char FAR *Find, char FAR *Replace, Nlm_Int4 MaxLength)
 
NLM_EXTERN Nlm_CharPtr LIBCALL StringEnd (char FAR *theString)
 
NLM_EXTERN Nlm_Int4 LIBCALL CountChar (char FAR *theString, char Char)
 
NLM_EXTERN Nlm_Int4 LIBCALL CountStrings (char FAR *theString, char FAR *Find)
 
NLM_EXTERN Nlm_Int4 LIBCALL CountSet (char FAR *theString, char FAR *Set)
 
NLM_EXTERN Nlm_CharPtr LIBCALL StripSpaces (char FAR *Line)
 
NLM_EXTERN void LIBCALL CleanSpaces (char FAR *Line)
 
NLM_EXTERN Nlm_Int4 LIBCALL StringDiff (char FAR *This, char FAR *That)
 
NLM_EXTERN Nlm_Int4 LIBCALL StringDiffNum (char FAR *This, char FAR *That, Nlm_Int4 NumChars)
 
NLM_EXTERN void LIBCALL TruncateString (char FAR *theString, Nlm_Int4 Length)
 
NLM_EXTERN Nlm_CharPtr LIBCALL TruncateStringCopy (char FAR *theString, Nlm_Int4 Length)
 
NLM_EXTERN Nlm_Int4 LIBCALL BreakString (char FAR *theString, Nlm_CharPtr PNTR Words)
 
NLM_EXTERN void LIBCALL DeleteChar (char FAR *theString, char Delete)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringPrintable (const Nlm_Char PNTR str, Nlm_Boolean rn_eol)
 
static void x_memcpy (Nlm_Char FAR PNTR targ, const Nlm_Char FAR PNTR src, size_t n)
 
static int can_break (Nlm_Char ch0, Nlm_Char ch1)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_text2stream (const Nlm_Char FAR PNTR str)
 
NLM_EXTERN size_t Nlm_stream2text (const Nlm_Char FAR PNTR str, size_t max_col, int PNTR dash)
 
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_rule_line (const Nlm_Char FAR PNTR str, size_t len, enumRuleLine method)
 

Macro Definition Documentation

◆ MAX_NO_DASH

#define MAX_NO_DASH   2

Definition at line 1748 of file ct_ncbistr.cpp.

◆ MIN_LEAD

#define MIN_LEAD   3

Definition at line 1749 of file ct_ncbistr.cpp.

◆ MIN_TAIL

#define MIN_TAIL   1

Definition at line 1750 of file ct_ncbistr.cpp.

◆ NEWLINE

#define NEWLINE   '\n'

Definition at line 1167 of file ct_ncbistr.cpp.

◆ SPACE [1/2]

#define SPACE   ' '

Definition at line 1752 of file ct_ncbistr.cpp.

◆ SPACE [2/2]

#define SPACE   ' '

Definition at line 1752 of file ct_ncbistr.cpp.

Function Documentation

◆ BreakString()

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.

◆ can_break()

static int can_break ( Nlm_Char  ch0,
Nlm_Char  ch1 
)
static

Definition at line 1774 of file ct_ncbistr.cpp.

References ch0, ch1, and IS_WHITESP.

Referenced by Nlm_stream2text().

◆ CleanSpaces()

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.

◆ CountChar()

NLM_EXTERN Nlm_Int4 LIBCALL CountChar ( char FAR theString,
char  Char 
)

Definition at line 1482 of file ct_ncbistr.cpp.

◆ CountSet()

NLM_EXTERN Nlm_Int4 LIBCALL CountSet ( char FAR theString,
char FAR Set 
)

Definition at line 1516 of file ct_ncbistr.cpp.

◆ CountStrings()

NLM_EXTERN Nlm_Int4 LIBCALL CountStrings ( char FAR theString,
char FAR Find 
)

Definition at line 1495 of file ct_ncbistr.cpp.

References Len, Nlm_StringLen(), NULLB, and SkipToString().

◆ DeleteChar()

NLM_EXTERN void LIBCALL DeleteChar ( char FAR theString,
char  Delete 
)

Definition at line 1675 of file ct_ncbistr.cpp.

References NULLB.

◆ Nlm_ClearDestString()

static BEGIN_CTRANSITION_SCOPE Nlm_CharPtr NEAR Nlm_ClearDestString ( Nlm_CharPtr  to,
size_t  max 
)
static

Definition at line 49 of file ct_ncbistr.cpp.

References max(), Nlm_MemSet, and NULL.

Referenced by Nlm_StringCpy(), and Nlm_StringNCpy().

◆ Nlm_CompressSpaces()

NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_CompressSpaces ( Nlm_CharPtr  str)

Definition at line 432 of file ct_ncbistr.cpp.

References last(), NULL, and str().

◆ Nlm_DigitRunLength()

static int Nlm_DigitRunLength ( Nlm_CharPtr  str)
static

Definition at line 538 of file ct_ncbistr.cpp.

References IS_DIGIT, len, NULL, and str().

Referenced by Nlm_NaturalStringCmpEx().

◆ Nlm_FindSubString()

static Nlm_CharPtr Nlm_FindSubString ( const char FAR str,
const char FAR sub,
Nlm_Boolean  caseCounts 
)
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_LabelCopy()

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.

References len, and NULL.

Referenced by Nlm_LabelCopyExtra(), and Nlm_LabelCopyNext().

◆ Nlm_LabelCopyExtra()

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(), NULL, prefix, and suffix.

◆ Nlm_LabelCopyNext()

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

NLM_EXTERN Nlm_Int2 LIBCALL Nlm_MeshStringICmp ( const char FAR str1,
const char FAR str2 
)

Definition at line 647 of file ct_ncbistr.cpp.

References ch1, ch2, NULL, and TO_LOWER.

◆ Nlm_NaturalStringCmp()

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

◆ Nlm_NaturalStringCmpEx()

static int LIBCALL Nlm_NaturalStringCmpEx ( Nlm_CharPtr  str1,
Nlm_CharPtr  str2,
Nlm_Boolean  caseInsensitive 
)
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_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_rule_line()

NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_rule_line ( const Nlm_Char FAR PNTR  str,
size_t  len,
enumRuleLine  method 
)

◆ Nlm_StrCnt()

NLM_EXTERN size_t LIBCALL Nlm_StrCnt ( const char FAR s,
const char FAR x_list 
)

Definition at line 483 of file ct_ncbistr.cpp.

References CHAR_BIT, cnt, DIM, and NULL.

Referenced by Nlm_StringCnt().

◆ Nlm_stream2text()

NLM_EXTERN size_t Nlm_stream2text ( const Nlm_Char FAR PNTR  str,
size_t  max_col,
int PNTR  dash 
)

◆ Nlm_StrICmp()

NLM_EXTERN int LIBCALL Nlm_StrICmp ( const char FAR a,
const char FAR b 
)

Definition at line 222 of file ct_ncbistr.cpp.

References a, b, done, and TO_UPPER.

Referenced by Nlm_StringICmp().

◆ Nlm_StringCat()

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

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

◆ Nlm_StringCmp()

NLM_EXTERN int LIBCALL Nlm_StringCmp ( const char FAR a,
const char FAR b 
)

Definition at line 97 of file ct_ncbistr.cpp.

References a, b, and StrCmp.

◆ Nlm_StringCnt()

NLM_EXTERN size_t LIBCALL Nlm_StringCnt ( const char FAR str,
const char FAR x_list 
)

Definition at line 203 of file ct_ncbistr.cpp.

References Nlm_StrCnt(), and str().

◆ Nlm_StringCpy()

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

◆ Nlm_StringCSpn()

NLM_EXTERN size_t LIBCALL Nlm_StringCSpn ( const char FAR a,
const char FAR b 
)

Definition at line 132 of file ct_ncbistr.cpp.

References a, b, and Nlm_StrCSpn.

◆ Nlm_StringDoesHaveText()

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

NLM_EXTERN Nlm_Boolean LIBCALL Nlm_StringHasNoText ( const char FAR str)

◆ Nlm_StringICmp()

NLM_EXTERN int LIBCALL Nlm_StringICmp ( const char FAR a,
const char FAR b 
)

Definition at line 107 of file ct_ncbistr.cpp.

References a, b, and Nlm_StrICmp().

◆ Nlm_StringIsAllDigits()

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

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

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

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

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

NLM_EXTERN size_t LIBCALL Nlm_StringLen ( const char *  str)

◆ Nlm_StringLower()

NLM_EXTERN char* LIBCALL Nlm_StringLower ( char *  string)

Definition at line 213 of file ct_ncbistr.cpp.

References NULL, and StrLower.

◆ Nlm_StringMove()

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

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.

References max(), and StrNCat.

◆ Nlm_StringNCmp()

NLM_EXTERN int LIBCALL Nlm_StringNCmp ( const char FAR a,
const char FAR b,
size_t  max 
)

Definition at line 102 of file ct_ncbistr.cpp.

References a, b, max(), and StrNCmp.

◆ Nlm_StringNCpy()

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

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

◆ Nlm_StringNICmp()

NLM_EXTERN int LIBCALL Nlm_StringNICmp ( const char FAR a,
const char FAR b,
size_t  max 
)

Definition at line 112 of file ct_ncbistr.cpp.

References a, b, max(), and Nlm_StrNICmp().

◆ Nlm_StringPBrk()

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

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

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

NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringSave ( const char FAR from)

Definition at line 193 of file ct_ncbistr.cpp.

References Nlm_StrSave().

◆ Nlm_StringSaveNoNull()

NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_StringSaveNoNull ( const char FAR from)

Definition at line 198 of file ct_ncbistr.cpp.

References Nlm_StrSave().

◆ Nlm_StringSearch()

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.

◆ Nlm_StringSpn()

NLM_EXTERN size_t LIBCALL Nlm_StringSpn ( const char FAR a,
const char FAR b 
)

Definition at line 127 of file ct_ncbistr.cpp.

References a, b, and Nlm_StrSpn.

◆ Nlm_StringStr()

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

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

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.

References FAR, NULL, and tmp.

◆ Nlm_StringUpper()

NLM_EXTERN char* LIBCALL Nlm_StringUpper ( char *  string)

Definition at line 208 of file ct_ncbistr.cpp.

References NULL, and StrUpper.

◆ Nlm_StrIPCmp()

NLM_EXTERN int LIBCALL Nlm_StrIPCmp ( const char FAR a,
const char FAR b 
)

Definition at line 244 of file ct_ncbistr.cpp.

References a, b, done, isalnum(), and TO_UPPER.

◆ Nlm_StrLower()

NLM_EXTERN char* LIBCALL Nlm_StrLower ( char *  string)

Definition at line 524 of file ct_ncbistr.cpp.

References _ASSERT, isalpha(), NULL, string, and tolower().

◆ Nlm_StrMove()

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

◆ Nlm_StrNICmp()

NLM_EXTERN int LIBCALL Nlm_StrNICmp ( const char FAR a,
const char FAR b,
size_t  max 
)

Definition at line 281 of file ct_ncbistr.cpp.

References a, b, done, max(), and TO_UPPER.

Referenced by Nlm_StringNICmp().

◆ Nlm_StrNIPCmp()

NLM_EXTERN int LIBCALL Nlm_StrNIPCmp ( const char FAR a,
const char FAR b,
size_t  max 
)

Definition at line 305 of file ct_ncbistr.cpp.

References a, b, done, isalnum(), max(), and TO_UPPER.

◆ Nlm_StrSave()

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

NLM_EXTERN char* LIBCALL Nlm_StrUpper ( char *  string)

Definition at line 509 of file ct_ncbistr.cpp.

References _ASSERT, isalpha(), NULL, string, and toupper().

◆ Nlm_text2stream()

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

NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_TrimSpacesAroundString ( Nlm_CharPtr  str)

Definition at line 391 of file ct_ncbistr.cpp.

References NULL, and str().

◆ NoCaseSkipPastString()

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

◆ NoCaseSkipToString()

NLM_EXTERN Nlm_CharPtr LIBCALL NoCaseSkipToString ( char FAR theString,
char FAR Find 
)

Definition at line 1276 of file ct_ncbistr.cpp.

References toupper().

◆ s_StringToUint8()

static Nlm_Uint8 s_StringToUint8 ( const char *  str,
const char **  endptr,
int sgn 
)
static

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

◆ s_Uint8ToString()

static char* s_Uint8ToString ( Nlm_Uint8  value,
char *  str,
size_t  str_size 
)
static

Definition at line 956 of file ct_ncbistr.cpp.

References buf, i, str(), and value.

Referenced by Nlm_Int8ToString(), and Nlm_Uint8ToString().

◆ SkipChar()

NLM_EXTERN Nlm_CharPtr LIBCALL SkipChar ( char FAR theString,
char  Char 
)

◆ SkipPastChar()

NLM_EXTERN Nlm_CharPtr LIBCALL SkipPastChar ( char FAR theString,
char  Char 
)

Definition at line 1237 of file ct_ncbistr.cpp.

◆ SkipPastString()

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

◆ SkipSet()

NLM_EXTERN Nlm_CharPtr LIBCALL SkipSet ( char FAR theString,
char FAR CharSet 
)

Definition at line 1327 of file ct_ncbistr.cpp.

◆ SkipSpaces()

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

◆ SkipToChar()

NLM_EXTERN Nlm_CharPtr LIBCALL SkipToChar ( char FAR theString,
char  Char 
)

Definition at line 1227 of file ct_ncbistr.cpp.

◆ SkipToSet()

NLM_EXTERN Nlm_CharPtr LIBCALL SkipToSet ( char FAR theString,
char FAR CharSet 
)

Definition at line 1344 of file ct_ncbistr.cpp.

◆ SkipToSpace()

NLM_EXTERN Nlm_CharPtr LIBCALL SkipToSpace ( char FAR theString)

Definition at line 1208 of file ct_ncbistr.cpp.

References isspace().

Referenced by BreakString().

◆ SkipToString()

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

◆ StrCpyPtr()

NLM_EXTERN Nlm_CharPtr LIBCALL StrCpyPtr ( char FAR Dest,
char FAR Start,
char FAR Stop 
)

Definition at line 1170 of file ct_ncbistr.cpp.

References NULLB.

Referenced by BreakString().

◆ StrDupPtr()

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.

◆ StringDiff()

NLM_EXTERN Nlm_Int4 LIBCALL StringDiff ( char FAR This,
char FAR That 
)

Definition at line 1594 of file ct_ncbistr.cpp.

◆ StringDiffNum()

NLM_EXTERN Nlm_Int4 LIBCALL StringDiffNum ( char FAR This,
char FAR That,
Nlm_Int4  NumChars 
)

Definition at line 1613 of file ct_ncbistr.cpp.

◆ StringEnd()

NLM_EXTERN Nlm_CharPtr LIBCALL StringEnd ( char FAR theString)

Definition at line 1471 of file ct_ncbistr.cpp.

References NULLB.

Referenced by StripSpaces().

◆ StringSub()

NLM_EXTERN Nlm_Boolean LIBCALL StringSub ( char FAR theString,
char  Find,
char  Replace 
)

Definition at line 1362 of file ct_ncbistr.cpp.

References FALSE, NULLB, and TRUE.

◆ StringSubSet()

NLM_EXTERN Nlm_Boolean LIBCALL StringSubSet ( char FAR theString,
char FAR FindSet,
char  Replace 
)

Definition at line 1380 of file ct_ncbistr.cpp.

References FALSE, NULLB, and TRUE.

◆ StringSubString()

NLM_EXTERN Nlm_Boolean LIBCALL StringSubString ( char FAR theString,
char FAR Find,
char FAR Replace,
Nlm_Int4  MaxLength 
)

◆ StripSpaces()

NLM_EXTERN Nlm_CharPtr LIBCALL StripSpaces ( char FAR Line)

Definition at line 1544 of file ct_ncbistr.cpp.

References isspace(), NULLB, SkipSpaces(), and StringEnd().

◆ TruncateString()

NLM_EXTERN void LIBCALL TruncateString ( char FAR theString,
Nlm_Int4  Length 
)

Definition at line 1634 of file ct_ncbistr.cpp.

References NULLB.

◆ TruncateStringCopy()

NLM_EXTERN Nlm_CharPtr LIBCALL TruncateStringCopy ( char FAR theString,
Nlm_Int4  Length 
)

Definition at line 1642 of file ct_ncbistr.cpp.

References MemNew, NULLB, and StrNCpy.

◆ x_memcpy()

static void x_memcpy ( Nlm_Char FAR PNTR  targ,
const Nlm_Char FAR PNTR  src,
size_t  n 
)
static

Definition at line 1756 of file ct_ncbistr.cpp.

References _ASSERT, IS_WHITESP, n, and SPACE.

Referenced by Nlm_rule_line().

Modified on Mon Mar 04 05:14:18 2024 by modify_doxy.py rev. 669887