OpenBarnyard
 
Loading...
Searching...
No Matches
TStringManager Class Reference

#include <TStringManager.h>

Static Public Member Functions

static TCHARGetTempString8 ()
 
static TINT String8Compare (const TCHAR *str1, const TCHAR *str2, TSIZE size=-1)
 
static TINT String8CompareNoCase (const TCHAR *str1, const TCHAR *str2, TSIZE size=-1)
 
static TCHARString8Copy (TCHAR *dst, const TCHAR *src, TSIZE size=-1)
 
static TCHARString8CopySafe (TCHAR *dst, const TCHAR *src, TSIZE size=-1)
 
static const TCHARString8FindChar (const TCHAR *str, TCHAR character)
 
static const TCHARString8FindString (const TCHAR *str, const TCHAR *substr)
 
static TSIZE String8Length (const TCHAR *str)
 
static void String8ToLowerCase (TCHAR *str)
 
static TFLOAT String8ToFloat (const TCHAR *str)
 
static void String8Format (TCHAR *str, TINT size, const TCHAR *format,...)
 
static TWCHARGetTempString16 ()
 
static TINT String16Compare (const TWCHAR *str1, const TWCHAR *str2, TSIZE size=-1)
 
static TINT String16CompareNoCase (const TWCHAR *str1, const TWCHAR *str2, TSIZE size=-1)
 
static TWCHARString16Copy (TWCHAR *dst, const TWCHAR *src, TSIZE size=-1)
 
static TWCHARString16CopySafe (TWCHAR *dst, const TWCHAR *src, TSIZE size=-1)
 
static const TWCHARString16FindChar (const TWCHAR *str, TWCHAR character)
 
static const TWCHARString16FindString (const TWCHAR *str, TWCHAR *substr)
 
static TSIZE String16Length (const TWCHAR *str)
 
static void String16Format (TWCHAR *str, TINT size, const TWCHAR *format,...)
 
static TWCHARStringCharToUnicode (TWCHAR *a_UnicodeString, const TCHAR *a_CharString, TUINT32 a_iLength)
 
static TCHARStringUnicodeToChar (TCHAR *a_CharString, const TWCHAR *const &a_UnicodeString, TUINT32 a_iLength)
 

Detailed Description

Definition at line 9 of file TStringManager.h.

Member Function Documentation

◆ GetTempString16()

static TWCHAR * TStringManager::GetTempString16 ( )
inlinestatic

Definition at line 34 of file TStringManager.h.

static TWCHAR ms_aScratchMem[SCRATCH_MEM_SIZE]
Definition T2String16.h:61

◆ GetTempString8()

static TCHAR * TStringManager::GetTempString8 ( )
inlinestatic

Definition at line 12 of file TStringManager.h.

static TCHAR ms_aScratchMem[SCRATCH_MEM_SIZE]
Definition T2String8.h:61

◆ String16Compare()

static TINT TStringManager::String16Compare ( const TWCHAR * str1,
const TWCHAR * str2,
TSIZE size = -1 )
inlinestatic

Definition at line 35 of file TStringManager.h.

35{ return T2String16::Compare( str1, str2, size ); }
static TINT Compare(const TWCHAR *str1, const TWCHAR *str2, TSIZE size=-1)

◆ String16CompareNoCase()

static TINT TStringManager::String16CompareNoCase ( const TWCHAR * str1,
const TWCHAR * str2,
TSIZE size = -1 )
inlinestatic

Definition at line 36 of file TStringManager.h.

36{ return T2String16::CompareNoCase( str1, str2, size ); }
static TINT CompareNoCase(const TWCHAR *str1, const TWCHAR *str2, TSIZE size=-1)

◆ String16Copy()

static TWCHAR * TStringManager::String16Copy ( TWCHAR * dst,
const TWCHAR * src,
TSIZE size = -1 )
inlinestatic

Definition at line 37 of file TStringManager.h.

37{ return T2String16::Copy( dst, src, size ); }
static TWCHAR * Copy(TWCHAR *dst, const TWCHAR *src, TSIZE size=-1)

◆ String16CopySafe()

static TWCHAR * TStringManager::String16CopySafe ( TWCHAR * dst,
const TWCHAR * src,
TSIZE size = -1 )
inlinestatic

Definition at line 38 of file TStringManager.h.

38{ return T2String16::CopySafe( dst, src, size ); }
static TWCHAR * CopySafe(TWCHAR *dst, const TWCHAR *src, TSIZE size)

◆ String16FindChar()

static const TWCHAR * TStringManager::String16FindChar ( const TWCHAR * str,
TWCHAR character )
inlinestatic

Definition at line 39 of file TStringManager.h.

39{ return T2String16::FindChar( str, character ); }
static TWCHAR * FindChar(TWCHAR *str, TWCHAR character)

◆ String16FindString()

static const TWCHAR * TStringManager::String16FindString ( const TWCHAR * str,
TWCHAR * substr )
inlinestatic

Definition at line 40 of file TStringManager.h.

40{ return T2String16::FindString( str, substr ); }
static TWCHAR * FindString(TWCHAR *str, const TWCHAR *substr)

◆ String16Format()

static void TStringManager::String16Format ( TWCHAR * str,
TINT size,
const TWCHAR * format,
... )
inlinestatic

Definition at line 43 of file TStringManager.h.

44 {
45 va_list args;
46
47 va_start( args, format );
48
49 T2String16::FormatV( str, size, format, args );
50
51 va_end( args );
52 }
static TINT FormatV(TWCHAR *a_pcString, TINT size, const TWCHAR *a_pcFormat, va_list args)

◆ String16Length()

static TSIZE TStringManager::String16Length ( const TWCHAR * str)
inlinestatic

Definition at line 41 of file TStringManager.h.

41{ return T2String16::Length( str ); }
static TSIZE Length(const TWCHAR *str)

◆ String8Compare()

static TINT TStringManager::String8Compare ( const TCHAR * str1,
const TCHAR * str2,
TSIZE size = -1 )
inlinestatic

Definition at line 13 of file TStringManager.h.

13{ return T2String8::Compare( str1, str2, size ); }
static TINT Compare(const TCHAR *str1, const TCHAR *str2, TSIZE size=-1)
Definition T2String8.cpp:52

◆ String8CompareNoCase()

static TINT TStringManager::String8CompareNoCase ( const TCHAR * str1,
const TCHAR * str2,
TSIZE size = -1 )
inlinestatic

Definition at line 14 of file TStringManager.h.

14{ return T2String8::CompareNoCase( str1, str2, size ); }
static TINT CompareNoCase(const TCHAR *str1, const TCHAR *str2, TSIZE size=-1)
Definition T2String8.cpp:60

◆ String8Copy()

static TCHAR * TStringManager::String8Copy ( TCHAR * dst,
const TCHAR * src,
TSIZE size = -1 )
inlinestatic

Definition at line 15 of file TStringManager.h.

15{ return T2String8::Copy( dst, src, size ); }
static TCHAR * Copy(TCHAR *dst, const TCHAR *src, TSIZE size=-1)
Definition T2String8.cpp:68

◆ String8CopySafe()

static TCHAR * TStringManager::String8CopySafe ( TCHAR * dst,
const TCHAR * src,
TSIZE size = -1 )
inlinestatic

Definition at line 16 of file TStringManager.h.

16{ return T2String8::CopySafe( dst, src, size ); }
static TCHAR * CopySafe(TCHAR *dst, const TCHAR *src, TSIZE size)
Definition T2String8.cpp:84

◆ String8FindChar()

static const TCHAR * TStringManager::String8FindChar ( const TCHAR * str,
TCHAR character )
inlinestatic

Definition at line 17 of file TStringManager.h.

17{ return T2String8::FindChar( str, character ); }
static TCHAR * FindChar(TCHAR *str, TCHAR character)

◆ String8FindString()

static const TCHAR * TStringManager::String8FindString ( const TCHAR * str,
const TCHAR * substr )
inlinestatic

Definition at line 18 of file TStringManager.h.

18{ return T2String8::FindString( str, substr ); }
static TCHAR * FindString(TCHAR *str, const TCHAR *substr)

◆ String8Format()

static void TStringManager::String8Format ( TCHAR * str,
TINT size,
const TCHAR * format,
... )
inlinestatic

Definition at line 23 of file TStringManager.h.

24 {
25 va_list args;
26
27 va_start( args, format );
28
29 T2String8::FormatV( str, size, format, args );
30
31 va_end( args );
32 }
static TINT FormatV(TCHAR *a_pcString, TINT size, const TCHAR *a_pcFormat, va_list args)
Definition T2String8.cpp:22

◆ String8Length()

static TSIZE TStringManager::String8Length ( const TCHAR * str)
inlinestatic

Definition at line 19 of file TStringManager.h.

19{ return T2String8::Length( str ); }
static TSIZE Length(const TCHAR *str)

◆ String8ToFloat()

static TFLOAT TStringManager::String8ToFloat ( const TCHAR * str)
inlinestatic

Definition at line 21 of file TStringManager.h.

21{ return T2String8::StringToFloat( str ); }
static TFLOAT StringToFloat(const TCHAR *src)

◆ String8ToLowerCase()

static void TStringManager::String8ToLowerCase ( TCHAR * str)
inlinestatic

Definition at line 20 of file TStringManager.h.

20{ T2String8::ToLowerCase( str ); }
static void ToLowerCase(TCHAR *str)

◆ StringCharToUnicode()

TWCHAR * TStringManager::StringCharToUnicode ( TWCHAR * a_UnicodeString,
const TCHAR * a_CharString,
TUINT32 a_iLength )
static

Definition at line 13 of file TStringManager.cpp.

14{
15 TASSERT( ( a_UnicodeString != TNULL ) && ( a_CharString != TNULL ) );
16
17 auto iCharStringLength = String8Length( a_CharString );
18
19 if ( iCharStringLength < a_iLength || a_iLength == -1 )
20 a_iLength = iCharStringLength;
21
22 for ( TSIZE i = 0; i < a_iLength; i++ )
23 a_UnicodeString[ i ] = TWCHAR( a_CharString[ i ] );
24
25 a_UnicodeString[ a_iLength ] = L'\0';
26 return a_UnicodeString;
27}
#define TASSERT(X,...)
Definition Defines.h:138
wchar_t TWCHAR
Definition Typedefs.h:21
size_t TSIZE
Definition Typedefs.h:9
#define TNULL
Definition Typedefs.h:23
static TSIZE String8Length(const TCHAR *str)

◆ StringUnicodeToChar()

TCHAR * TStringManager::StringUnicodeToChar ( TCHAR * a_CharString,
const TWCHAR *const & a_UnicodeString,
TUINT32 a_iLength )
static

Definition at line 29 of file TStringManager.cpp.

30{
31 TASSERT( ( a_UnicodeString != TNULL ) && ( a_CharString != TNULL ) );
32
33 auto iUnicodeStringLength = String16Length( a_UnicodeString );
34
35 if ( iUnicodeStringLength < a_iLength || a_iLength == -1 )
36 a_iLength = iUnicodeStringLength;
37
38 for ( TSIZE i = 0; i < a_iLength; i++ )
39 a_CharString[ i ] = TCHAR( a_UnicodeString[ i ] );
40
41 a_CharString[ a_iLength ] = '\0';
42 return a_CharString;
43}
char TCHAR
Definition Typedefs.h:20
static TSIZE String16Length(const TWCHAR *str)

The documentation for this class was generated from the following files: