engine
 
载入中...
搜索中...
未找到
静态 Public 成员函数 | 所有成员列表
TCString< T > 模板结构体 参考

Set of basic string utility functions operating on plain C strings. 更多...

#include <CString.h>

静态 Public 成员函数

static FORCEINLINE double Atod (const CharType *String)
 atod wrapper
 
static FORCEINLINE float Atof (const CharType *String)
 atof wrapper
 
static FORCEINLINE int32 Atoi (const CharType *String)
 atoi wrapper
 
static FORCEINLINE int64 Atoi64 (const CharType *String)
 atoi64 wrapper
 
static FORCEINLINE int32 GetVarArgs (CharType *Dest, SIZE_T DestSize, const CharType *&Fmt, va_list ArgPtr)
 Helper function to write formatted output using an argument list 更多...
 
static FORCEINLINE int32 GetVarArgs (CharType *Dest, SIZE_T DestSize, int32 Count, const CharType *&Fmt, va_list ArgPtr)
 Helper function to write formatted output using an argument list 更多...
 
static bool IsNumeric (const CharType *Str)
 Returns whether this string contains only numeric characters 更多...
 
static FORCEINLINE bool IsPureAnsi (const CharType *Str)
 Returns whether this string contains only pure ansi characters 更多...
 
template<typename FmtType , typename... Types>
static int32 Snprintf (CharType *Dest, int32 DestSize, const FmtType &Fmt, Types... Args)
 Safe string formatted print.
 
static const CharType * Spc (int32 NumSpaces)
 Returns a static string that is filled with a variable number of spaces 更多...
 
template<typename FmtType , typename... Types>
static int32 Sprintf (CharType *Dest, const FmtType &Fmt, Types... Args)
 Standard string formatted print. 更多...
 
static FORCEINLINE CharType * Strcat (CharType *Dest, SIZE_T DestCount, const CharType *Src)
 strcat wrapper 更多...
 
template<SIZE_T DestCount>
static FORCEINLINE CharType * Strcat (CharType(&Dest)[DestCount], const CharType *Src)
 strcat wrapper (templated version to automatically handle static destination array case) 更多...
 
static FORCEINLINE const CharType * Strchr (const CharType *String, CharType c)
 strchr wrapper
 
static FORCEINLINE int32 Strcmp (const CharType *String1, const CharType *String2)
 strcmp wrapper
 
static FORCEINLINE CharType * Strcpy (CharType *Dest, SIZE_T DestCount, const CharType *Src)
 strcpy wrapper 更多...
 
template<SIZE_T DestCount>
static FORCEINLINE CharType * Strcpy (CharType(&Dest)[DestCount], const CharType *Src)
 strcpy wrapper (templated version to automatically handle static destination array case) 更多...
 
static FORCEINLINE int32 Strcspn (const CharType *String, const CharType *Mask)
 strcspn wrapper
 
static const CharType * Strfind (const CharType *Str, const CharType *Find, bool bSkipQuotedChars=false)
 Find string in string, case sensitive, requires non-alphanumeric lead-in.
 
static const CharType * StrfindDelim (const CharType *Str, const CharType *Find, const CharType *Delim=LITERAL(CharType, " \t,"))
 Finds string in string, case insensitive, requires the string be surrounded by one the specified delimiters, or the start or end of the string.
 
static FORCEINLINE int32 Stricmp (const CharType *String1, const CharType *String2)
 stricmp wrapper
 
static const CharType * Strifind (const CharType *Str, const CharType *Find, bool bSkipQuotedChars=false)
 Find string in string, case insensitive, requires non-alphanumeric lead-in.
 
static CharType * Stristr (CharType *Str, const CharType *Find)
 Finds string in string, case insensitive (non-const version) 更多...
 
static const CharType * Stristr (const CharType *Str, const CharType *Find)
 Finds string in string, case insensitive 更多...
 
static FORCEINLINE int32 Strlen (const CharType *String)
 strlen wrapper
 
static CharType * Strncat (CharType *Dest, const CharType *Src, int32 MaxLen)
 Concatenate a string with length checking. 更多...
 
static FORCEINLINE int32 Strncmp (const CharType *String1, const CharType *String2, SIZE_T Count)
 strncmp wrapper
 
static FORCEINLINE CharType * Strncpy (CharType *Dest, const CharType *Src, int32 MaxLen)
 Copy a string with length checking. 更多...
 
static FORCEINLINE int32 Strnicmp (const CharType *String1, const CharType *String2, SIZE_T Count)
 strnicmp wrapper
 
static FORCEINLINE int32 Strnlen (const CharType *String, SIZE_T StringSize)
 Calculate the length of the string up to the given size. 更多...
 
static FORCEINLINE const CharType * Strrchr (const CharType *String, CharType c)
 strrchr wrapper
 
static FORCEINLINE const CharType * Strrstr (const CharType *String, const CharType *Find)
 strrstr wrapper
 
static FORCEINLINE int32 Strspn (const CharType *String, const CharType *Mask)
 strspn wrapper
 
static FORCEINLINE const CharType * Strstr (const CharType *String, const CharType *Find)
 strstr wrapper
 
static FORCEINLINE int32 Strtoi (const CharType *Start, CharType **End, int32 Base)
 strtoi wrapper
 
static FORCEINLINE int64 Strtoi64 (const CharType *Start, CharType **End, int32 Base)
 strtoi wrapper
 
static FORCEINLINE CharType * Strtok (CharType *TokenString, const CharType *Delim, CharType **Context)
 strtok wrapper
 
static FORCEINLINE uint64 Strtoui64 (const CharType *Start, CharType **End, int32 Base)
 strtoui wrapper
 
static FORCEINLINE CharType * Strupr (CharType *Dest, SIZE_T DestCount)
 strupr wrapper 更多...
 
template<SIZE_T DestCount>
static FORCEINLINE CharType * Strupr (CharType(&Dest)[DestCount])
 strupr wrapper (templated version to automatically handle static destination array case) 更多...
 
static const CharType * Tab (int32 NumTabs)
 Returns a static string that is filled with a variable number of tabs 更多...
 
static FORCEINLINE bool ToBool (const CharType *String)
 Converts a string into a boolean value 1, "True", "Yes", FCoreTexts::True, FCoreTexts::Yes, and non-zero integers become true 0, "False", "No", FCoreTexts::False, FCoreTexts::No, and unparsable values become false 更多...
 

详细描述

template<typename T>
struct TCString< T >

Set of basic string utility functions operating on plain C strings.

In addition to the wrapped C string API,this struct also contains a set of widely used utility functions that operate on c strings. There is a specialized implementation for ANSICHAR and WIDECHAR strings provided. To access these functionality, the convenience typedefs FCString and FCStringAnsi are provided.

成员函数说明

◆ GetVarArgs() [1/2]

template<typename T >
FORCEINLINE int32 TCString< T >::GetVarArgs ( CharType *  Dest,
SIZE_T  DestSize,
const CharType *&  Fmt,
va_list  ArgPtr 
)
static

Helper function to write formatted output using an argument list

参数
Dest- destination string buffer
DestSize- size of destination buffer
Fmt- string to print
Args- argument list
返回
number of characters written or -1 if truncated

◆ GetVarArgs() [2/2]

template<typename T >
static FORCEINLINE int32 TCString< T >::GetVarArgs ( CharType *  Dest,
SIZE_T  DestSize,
int32  Count,
const CharType *&  Fmt,
va_list  ArgPtr 
)
inlinestatic

Helper function to write formatted output using an argument list

参数
Dest- destination string buffer
DestSize- size of destination buffer
Count- number of characters to write (not including null terminating character)
Fmt- string to print
Args- argument list
返回
number of characters written or -1 if truncated

◆ IsNumeric()

template<typename T >
static bool TCString< T >::IsNumeric ( const CharType *  Str)
inlinestatic

Returns whether this string contains only numeric characters

参数
Str- string that will be checked

◆ IsPureAnsi()

template<typename T >
static FORCEINLINE bool TCString< T >::IsPureAnsi ( const CharType *  Str)
static

Returns whether this string contains only pure ansi characters

参数
Str- string that will be checked

◆ Spc()

template<typename T >
const TCString< T >::CharType * TCString< T >::Spc ( int32  NumSpaces)
static

Returns a static string that is filled with a variable number of spaces

参数
NumSpacesNumber of spaces to put into the string, max of 255
返回
The string of NumSpaces spaces.

◆ Sprintf()

template<typename T >
template<typename FmtType , typename... Types>
static int32 TCString< T >::Sprintf ( CharType *  Dest,
const FmtType &  Fmt,
Types...  Args 
)
inlinestatic

Standard string formatted print.

警告
: make sure code using FCString::Sprintf allocates enough (>= MAX_SPRINTF) memory for the destination buffer

◆ Strcat() [1/2]

template<typename T >
FORCEINLINE TCString< T >::CharType * TCString< T >::Strcat ( CharType *  Dest,
SIZE_T  DestCount,
const CharType *  Src 
)
static

strcat wrapper

参数
Dest- destination string to copy to
Destcount- size of Dest in characters
Src- source string
返回
destination string

◆ Strcat() [2/2]

template<typename T >
template<SIZE_T DestCount>
static FORCEINLINE CharType * TCString< T >::Strcat ( CharType(&)  Dest[DestCount],
const CharType *  Src 
)
inlinestatic

strcat wrapper (templated version to automatically handle static destination array case)

参数
Dest- destination string to copy to
Src- source string
返回
destination string

◆ Strcpy() [1/2]

template<typename T >
FORCEINLINE TCString< T >::CharType * TCString< T >::Strcpy ( CharType *  Dest,
SIZE_T  DestCount,
const CharType *  Src 
)
static

strcpy wrapper

参数
Dest- destination string to copy to
Destcount- size of Dest in characters
Src- source string
返回
destination string

◆ Strcpy() [2/2]

template<typename T >
template<SIZE_T DestCount>
static FORCEINLINE CharType * TCString< T >::Strcpy ( CharType(&)  Dest[DestCount],
const CharType *  Src 
)
inlinestatic

strcpy wrapper (templated version to automatically handle static destination array case)

参数
Dest- destination string to copy to
Src- source string
返回
destination string

◆ Stristr() [1/2]

template<typename T >
static CharType * TCString< T >::Stristr ( CharType *  Str,
const CharType *  Find 
)
inlinestatic

Finds string in string, case insensitive (non-const version)

参数
StrThe string to look through
FindThe string to find inside Str
返回
Position in Str if Find was found, otherwise, NULL

◆ Stristr() [2/2]

template<typename T >
const TCString< T >::CharType * TCString< T >::Stristr ( const CharType *  Str,
const CharType *  Find 
)
static

Finds string in string, case insensitive

参数
StrThe string to look through
FindThe string to find inside Str
返回
Position in Str if Find was found, otherwise, NULL

◆ Strncat()

template<typename T >
static CharType * TCString< T >::Strncat ( CharType *  Dest,
const CharType *  Src,
int32  MaxLen 
)
inlinestatic

Concatenate a string with length checking.

参数
Dest- destination buffer to append to
Src- source buffer to copy from
MaxLen- max length of the buffer
返回
pointer to resulting string buffer

◆ Strncpy()

template<typename T >
FORCEINLINE TCString< T >::CharType * TCString< T >::Strncpy ( CharType *  Dest,
const CharType *  Src,
int32  MaxLen 
)
static

Copy a string with length checking.

Behavior differs from strncpy in that last character is zeroed.

参数
Dest- destination buffer to copy to
Src- source buffer to copy from
MaxLen- max length of the buffer (including null-terminator)
返回
pointer to resulting string buffer

◆ Strnlen()

template<typename T >
FORCEINLINE int32 TCString< T >::Strnlen ( const CharType *  String,
SIZE_T  StringSize 
)
static

Calculate the length of the string up to the given size.

参数
StringA possibly-null-terminated string in a character array with a size of at least StringSize.
StringSizeThe maximum number of characters to read from String.
返回
Length The smaller of StringSize and the number of characters in String before a null character.

◆ Strupr() [1/2]

template<typename T >
FORCEINLINE TCString< T >::CharType * TCString< T >::Strupr ( CharType *  Dest,
SIZE_T  DestCount 
)
static

strupr wrapper

参数
Dest- destination string to convert
Destcount- size of Dest in characters
返回
destination string

◆ Strupr() [2/2]

template<typename T >
template<SIZE_T DestCount>
static FORCEINLINE CharType * TCString< T >::Strupr ( CharType(&)  Dest[DestCount])
inlinestatic

strupr wrapper (templated version to automatically handle static destination array case)

参数
Dest- destination string to convert
返回
destination string

◆ Tab()

template<typename T >
const TCString< T >::CharType * TCString< T >::Tab ( int32  NumTabs)
static

Returns a static string that is filled with a variable number of tabs

参数
NumTabsNumber of tabs to put into the string, max of 255
返回
The string of NumTabs tabs.

◆ ToBool()

template<typename T >
static FORCEINLINE bool TCString< T >::ToBool ( const CharType *  String)
static

Converts a string into a boolean value 1, "True", "Yes", FCoreTexts::True, FCoreTexts::Yes, and non-zero integers become true 0, "False", "No", FCoreTexts::False, FCoreTexts::No, and unparsable values become false

返回
The boolean value

该结构体的文档由以下文件生成: