"L. Spiro Engine"
Static Public Member Functions

lsstd::CStd Class Reference

Standard CRT-type functions. More...

#include <LSSTDStandardLib.h>

List of all members.

Static Public Member Functions

static LSINT32 LSE_CALL WStrCmp (const LSUTFX *_pwcLeft, const LSUTFX *_pwcRight)
static LSINT32 LSE_CALL WStrICmp (const LSUTFX *_pwcLeft, const LSUTFX *_pwcRight)
static LSINT32 LSE_CALL WStrNCmp (const LSUTFX *_pwcLeft, const LSUTFX *_pwcRight, LSUINT32 _ui32Max)
static LSINT32 LSE_CALL WStrNICmp (const LSUTFX *_pwcLeft, const LSUTFX *_pwcRight, LSUINT32 _ui32Max)
static LSUTFX *LSE_CALL WStrCpy (LSUTFX *_pwcDst, const LSUTFX *_pwcSrc)
static LSUTFX *LSE_CALL WStrNCpy (LSUTFX *_pwcDst, const LSUTFX *_pwcSrc, LSUINT32 _ui32Max)
static LSUINT32 LSE_CALL WStrLen (const LSUTFX *_pwcStr)
static LSUTFX *LSE_CALL WStrCat (LSUTFX *_pwcLeft, const LSUTFX *_pwcRight)
static LSUTFX *LSE_CALL WStrNCat (LSUTFX *_pwcLeft, const LSUTFX *_pwcRight, LSUINT32 _ui32Max)
static LSUINT32 LSE_CALL WStrCSpn (const LSUTFX *_pwcString, const LSUTFX *_pwcCharSet)
static LSINT32 LSE_CALL StrCmp (const LSCHAR *_pcLeft, const LSCHAR *_pcRight)
static LSINT32 LSE_CALL StrICmp (const LSCHAR *_pcLeft, const LSCHAR *_pcRight)
static LSINT32 LSE_CALL StrNCmp (const LSCHAR *_pcLeft, const LSCHAR *_pcRight, LSUINT32 _ui32Max)
static LSINT32 LSE_CALL StrNICmp (const LSCHAR *_pcLeft, const LSCHAR *_pcRight, LSUINT32 _ui32Max)
static LSCHAR *LSE_CALL StrCpy (LSCHAR *_pcDst, const LSCHAR *_pcSrc)
static LSCHAR *LSE_CALL StrNCpy (LSCHAR *_pcDst, const LSCHAR *_pcSrc, LSUINT32 _ui32Max)
static LSUINT32 LSE_CALL StrLen (const LSCHAR *_pcStr)
static LSCHAR *LSE_CALL StrCat (LSCHAR *_pcLeft, const LSCHAR *_pcRight)
static LSCHAR *LSE_CALL StrNCat (LSCHAR *_pcLeft, const LSCHAR *_pcRight, LSUINT32 _ui32Max)
static LSUINT32 LSE_CALL StrCSpn (const LSCHAR *_pcString, const LSCHAR *_pcCharSet)
static LSUTFX *LSE_CALL WStrDup (const LSUTFX *_pwcSrc)
static LSVOID LSE_CALL WStrDel (LSUTFX *_pwcStr)
static LSCHAR *LSE_CALL StrDup (const LSCHAR *_pcSrc)
static LSVOID LSE_CALL StrDel (LSCHAR *_pcStr)
static LSUTFX LSE_CALL ToLower (LSUTFX _wcChar)
static LSUTFX LSE_CALL ToUpper (LSUTFX _wcChar)
static LSCHAR LSE_CALL ToLower (LSCHAR _cChar)
static LSCHAR LSE_CALL ToUpper (LSCHAR _cChar)
static LSINT32 LSE_CALL WtoI32 (const LSUTFX *_pwcString)
static LSINT32 LSE_CALL AtoI32 (const LSCHAR *_pcString)
static LSINT64 LSE_CALL WtoI64 (const LSUTFX *_pwcString)
static LSINT64 LSE_CALL AtoI64 (const LSCHAR *_pcString)
static LSINT64 LSE_CALL WHtoI64 (const LSUTFX *_pwcString)
static LSINT64 LSE_CALL AHtoI64 (const LSCHAR *_pcString)
static LSUTFX *LSE_CALL I32toW (LSINT32 _i32Value, LSUTFX *_pwcRet, LSUINT32 _ui32Radix=10)
static LSCHAR *LSE_CALL I32toA (LSINT32 _i32Value, LSCHAR *_pcRet, LSUINT32 _ui32Radix=10)
static LSUTFX *LSE_CALL I64toW (LSINT64 _i64Value, LSUTFX *_pwcRet, LSUINT32 _ui32Radix=10)
static LSCHAR *LSE_CALL I64toA (LSINT64 _i64Value, LSCHAR *_pcRet, LSUINT32 _ui32Radix=10)
static LSUTFX *LSE_CALL UI32toW (LSUINT32 _ui32Value, LSUTFX *_pwcRet, LSUINT32 _ui32Radix=10)
static LSCHAR *LSE_CALL UI32toA (LSUINT32 _ui32Value, LSCHAR *_pcRet, LSUINT32 _ui32Radix=10)
static LSUTFX *LSE_CALL UI64toW (LSUINT64 _ui64Value, LSUTFX *_pwcRet, LSUINT32 _ui32Radix=10)
static LSCHAR *LSE_CALL UI64toA (LSUINT64 _ui64Value, LSCHAR *_pcRet, LSUINT32 _ui32Radix=10)
static LSDOUBLE LSE_CALL WtoF (const LSUTFX *_pwcString)
static LSDOUBLE LSE_CALL AtoF (const LSCHAR *_pcString)
static LSUTFX *LSE_CALL FtoW (LSUTFX *_pwcBuffer, LSUINT32 _ui32MaxLen, LSDOUBLE _dValue, LSUINT32 _ui32Precision=6UL, LSINT8 _i8Format= 'f')
static LSCHAR *LSE_CALL FtoA (LSCHAR *_pcBuffer, LSUINT32 _ui32MaxLen, LSDOUBLE _dValue, LSUINT32 _ui32Precision=6UL, LSINT8 _i8Format= 'f')
static LSUTFX *LSE_CALL CharToWChar (const LSCHAR *_pcSrc, LSUTFX *_pwcRet)
static LSCHAR *LSE_CALL WCharToChar (const LSUTFX *_pwcSrc, LSCHAR *_pcRet)
static LSCHAR *LSE_CALL UtfXToUtf8 (const LSUTFX *_pwcSrc, LSCHAR *_pcRet, LSUINT32 _ui32RetLen)
static LSUINT32 LSE_CALL UtfXToUtf8Len (const LSUTFX *_pwcSrc)
static LSUINT32 LSE_CALL NextUtf32Char (const LSUTF32 *_putf32Char, LSUINT32 _ui32Len, LSUINT32 *_pui32Size=0)
static LSUINT32 LSE_CALL NextUtf16Char (const LSUTF16 *_putf16Char, LSUINT32 _ui32Len, LSUINT32 *_pui32Size=0)
static LSUINT32 LSE_CALL NextUtf8Char (const LSUTF8 *_putf8Char, LSUINT32 _ui32Len, LSUINT32 *_pui32Size=0)
static LSUINT32 LSE_CALL RawUnicodeToUtf32Char (LSUINT32 _ui32Raw, LSUINT32 &_ui32Len)
static LSUINT32 LSE_CALL RawUnicodeToUtf16Char (LSUINT32 _ui32Raw, LSUINT32 &_ui32Len)
static LSUINT32 LSE_CALL RawUnicodeToUtf8Char (LSUINT32 _ui32Raw, LSUINT32 &_ui32Len)
static LSUINT32 LSE_CALL Utf32ToUnicodeRaw (LSUINT32 *_pui32Dst, const LSUTF32 *_putf32Src, LSUINT32 _ui32MaxLen)
static LSUINT32 LSE_CALL Utf16ToUnicodeRaw (LSUINT32 *_pui32Dst, const LSUTF16 *_putf16Src, LSUINT32 _ui32MaxLen)
static LSUINT32 LSE_CALL Utf8ToUnicodeRaw (LSUINT32 *_pui32Dst, const LSUTF8 *_putf8Src, LSUINT32 _ui32MaxLen)
static LSUINT32 LSE_CALL RawUnicodeToUtf32 (LSUTF32 *_putf32Dst, const LSUINT32 *_pui32Src, LSUINT32 _ui32MaxLen)
static LSUINT32 LSE_CALL RawUnicodeToUtf16 (LSUTF16 *_putf16Dst, const LSUINT32 *_pui32Src, LSUINT32 _ui32MaxLen)
static LSUINT32 LSE_CALL RawUnicodeToUtf8 (LSUTF8 *_putf8Dst, const LSUINT32 *_pui32Src, LSUINT32 _ui32MaxLen)
static LSUINT32 LSE_CALL Utf32ToUtf8 (LSUTF8 *_putf8Dst, const LSUTF32 *_putf32Src, LSUINT32 _ui32MaxLen)
static LSUINT32 LSE_CALL Utf32ToUtf16 (LSUTF16 *_putf16Dst, const LSUTF32 *_putf32Src, LSUINT32 _ui32MaxLen)
static LSUINT32 LSE_CALL Utf16ToUtf8 (LSUTF8 *_putf8Dst, const LSUTF16 *_putf16Src, LSUINT32 _ui32MaxLen)
static LSUINT32 LSE_CALL Utf16ToUtf32 (LSUTF32 *_putf32Dst, const LSUTF16 *_putf16Src, LSUINT32 _ui32MaxLen)
static LSUINT32 LSE_CALL Utf8ToUtf16 (LSUTF16 *_putf16Dst, const LSUTF8 *_putf8Src, LSUINT32 _ui32MaxLen)
static LSUINT32 LSE_CALL Utf8ToUtf32 (LSUTF32 *_putf32Dst, const LSUTF8 *_putf8Src, LSUINT32 _ui32MaxLen)
static LSUINT32 LSE_CALL Utf8ToUtfX (LSUTFX *_putfxDst, const LSUTF8 *_putf8Src, LSUINT32 _ui32MaxLen)
static LSUINT32 LSE_CALL Utf32StrLen (const LSUTF32 *_putf32String)
static LSUINT32 LSE_CALL Utf16StrLen (const LSUTF16 *_putf16String)
static LSUINT32 LSE_CALL Utf8StrLen (const LSUTF8 *_putf8String)
static LSUINT32 LSE_CALL Utf32StrLenAsUtf8 (const LSUTF32 *_putf32String)
static LSUINT32 LSE_CALL Utf32StrLenAsUtf16 (const LSUTF32 *_putf32String)
static LSUINT32 LSE_CALL Utf16StrLenAsUtf8 (const LSUTF16 *_putf16String)
static LSUINT32 LSE_CALL Utf16StrLenAsUtf32 (const LSUTF16 *_putf16String)
static LSUINT32 LSE_CALL Utf8StrLenAsUtf16 (const LSUTF8 *_putf8String)
static LSUINT32 LSE_CALL Utf8StrLenAsUtf32 (const LSUTF8 *_putf8String)
static LSUINT32 LSE_CALL Utf8StrLenAsUtfX (const LSUTF8 *_putf8String)
static LSBOOL LSE_CALL IsWhitespace (LSUTFX _wcChar)
static LSBOOL LSE_CALL IsWhitespace (LSCHAR _cChar)
static LSBOOL LSE_CALL IsAlpha (LSUTFX _wcChar)
static LSBOOL LSE_CALL IsAlpha (LSCHAR _cChar)
static LSBOOL LSE_CALL IsDigit (LSUTFX _wcChar)
static LSBOOL LSE_CALL IsDigit (LSCHAR _cChar)
static LSBOOL LSE_CALL IsAlNum (LSUTFX _wcChar)
static LSBOOL LSE_CALL IsAlNum (LSCHAR _cChar)
static LSBOOL LSE_CALL IsIdentifier (const LSUTFX *_pwcStr)
static LSBOOL LSE_CALL IsIdentifier (const LSCHAR *_pcStr)
static LSVOID *LSE_CALL MemCpy (LSVOID *_pvDst, const LSVOID *_pvSrc, LSUINTPTR _uiptrSize)
static LSVOID *LSE_CALL MemMove (LSVOID *_pvDst, const LSVOID *_pvSrc, LSUINTPTR _uiptrSize)
static LSBOOL LSE_CALL MemCmpF (const LSVOID *_pvBuf0, const LSVOID *_pvBuf1, LSUINTPTR _uiptrSize)
static LSINT32 LSE_CALL MemCmp (const LSVOID *_pvBuf0, const LSVOID *_pvBuf1, LSUINTPTR _uiptrSize)
static LSVOID LSE_CALL MemSet (LSVOID *_pvDst, LSUINT8 _ui8Value, LSUINTPTR _uiptrSize)
static const LSVOID *LSE_CALL MemChr (const LSVOID *_pvBuffer, LSUINT8 _ui8Value, LSUINTPTR _uiptrSize)
static LSVOID *LSE_CALL MemChr (LSVOID *_pvBuffer, LSUINT8 _ui8Value, LSUINTPTR _uiptrSize)
static LSUINT32 LSE_CALL WSPrintF (LSUTFX *_pwcDest, LSUINTPTR _uiptrMaxLen, const LSUTFX *_pwcFormat,...)
static LSUINT32 LSE_CALL SPrintF (LSCHAR *_pcDest, LSUINTPTR _uiptrMaxLen, const LSCHAR *_pcFormat,...)
static LSVOID LSE_CALL Sleep (LSUINT32 _ui32Milliseconds)
static LSUINT64 LSE_CALL ByteSwap64 (LSUINT64 _ui64Value)
static LSUINT32 LSE_CALL ByteSwap32 (LSUINT32 _ui32Value)
static LSUINT16 LSE_CALL ByteSwap16 (LSUINT16 _ui16Value)
static LSUINT8 LSE_CALL BitSwap8 (LSUINT8 _ui8Byte)
static LSUINT16 LSE_CALL BitSwap16 (LSUINT16 _ui16Value)
static LSUINT32 LSE_CALL BitSwap32 (LSUINT32 _ui32Value)
static LSUINT64 LSE_CALL BitSwap64 (LSUINT64 _ui64Value)
static LSUINT32 LSE_CALL CountBits (LSUINT32 _ui32Value)
static LSUINT32 LSE_FCALL GetLowestPo2 (LSUINT32 _ui32Value)
static LSVOID LSE_CALL DebugPrintW (const LSUTFX *_pwcString)
static LSVOID LSE_CALL DebugPrintA (const LSCHAR *_pcString)
static LSVOID LSE_CALL PrintError (LSSTD_ERRORS _eError)
template<class T >
static T LSE_CALL Min (T _tLeft, T _tRight)
template<class T >
static T LSE_CALL Max (T _tLeft, T _tRight)
template<class T >
static T LSE_CALL Clamp (T _tValue, T _tLow, T _tHigh)
static LSE_INLINE LSINT64 LSE_CALL RoundInt (LSDOUBLE _dValue)
static LSE_INLINE LSINT64 LSE_CALL RoundInt (LSFLOAT _fValue)
static LSE_INLINE LSUINT32
LSE_FCALL 
HighestBit (LSUINT64 _ui64Value)
static LSE_INLINE LSUINT32
LSE_FCALL 
HighestBit (LSUINT32 _ui32Value)

Detailed Description

Standard CRT-type functions.

Class CStd Description: Standard routines and types. This library is just a bunch of common helpful routines normally found in the C-runtime (etc.) These functions should be used instead of their CRT counterparts. Reasons include speed, consistency and portability.


Member Function Documentation

static LSINT64 LSE_CALL lsstd::CStd::AHtoI64 ( const LSCHAR *  _pcString) [static]

Convert a hexadecimal string to a signed 64-bit integer.

Parameters:
_pcStringString to be converted.
Returns:
Returns the LSINT64 value produced by interpreting the input characters as a number in hexadecimal format. If the input cannot be converted to a value of that type, the return value is 0.
static LSDOUBLE LSE_CALL lsstd::CStd::AtoF ( const LSCHAR *  _pcString) [static]

Converts a string to double.

Parameters:
_pcStringString to be converted.
Returns:
Returns the double value produced by interpreting the input characters as a number. The return value is 0.0 if the input cannot be converted to a value of that type.
static LSINT32 LSE_CALL lsstd::CStd::AtoI32 ( const LSCHAR *  _pcString) [static]

Convert a string to a signed 32-bit integer.

Parameters:
_pcStringString to be converted.
Returns:
Returns the LSINT32 value produced by interpreting the input characters as a number. If the input cannot be converted to a value of that type, the return value is 0.
static LSINT64 LSE_CALL lsstd::CStd::AtoI64 ( const LSCHAR *  _pcString) [static]

Convert a string to a signed 64-bit integer.

Parameters:
_pcStringString to be converted.
Returns:
Returns the LSINT64 value produced by interpreting the input characters as a number. If the input cannot be converted to a value of that type, the return value is 0.
LSE_INLINE LSUINT16 LSE_CALL lsstd::CStd::BitSwap16 ( LSUINT16  _ui16Value) [static]

Swap the bits in a 16-bit value.

Parameters:
_ui16ValueThe value to be bitswapped.
Returns:
Returns the bitswapped value.
LSE_INLINE LSUINT32 LSE_CALL lsstd::CStd::BitSwap32 ( LSUINT32  _ui32Value) [static]

Swap the bits in a 32-bit value.

Parameters:
_ui32ValueThe value to be bitswapped.
Returns:
Returns the bitswapped value.
LSE_INLINE LSUINT64 LSE_CALL lsstd::CStd::BitSwap64 ( LSUINT64  _ui64Value) [static]

Swap the bits in a 64-bit value.

Parameters:
_ui64ValueThe value to be bitswapped.
Returns:
Returns the bitswapped value.
LSE_INLINE LSUINT8 LSE_CALL lsstd::CStd::BitSwap8 ( LSUINT8  _ui8Byte) [static]

Swap the bits in a single byte.

Parameters:
_ui8ByteThe byte to be bitswapped.
Returns:
Returns the bitswapped byte.
LSE_INLINE LSUINT16 LSE_CALL lsstd::CStd::ByteSwap16 ( LSUINT16  _ui16Value) [static]

Byte-swap a 2-byte value.

Parameters:
_ui16ValueValue to byte-swap.
Returns:
Returns the byte-swapped value.
LSE_INLINE LSUINT32 LSE_CALL lsstd::CStd::ByteSwap32 ( LSUINT32  _ui32Value) [static]

Byte-swap a 4-byte value.

Parameters:
_ui32ValueValue to byte-swap.
Returns:
Returns the byte-swapped value.
LSE_INLINE LSUINT64 LSE_CALL lsstd::CStd::ByteSwap64 ( LSUINT64  _ui64Value) [static]

Byte-swap an 8-byte value.

Parameters:
_ui64ValueValue to byte-swap.
Returns:
Returns the byte-swapped value.
static LSUTFX* LSE_CALL lsstd::CStd::CharToWChar ( const LSCHAR *  _pcSrc,
LSUTFX _pwcRet 
) [static]

Convert a const LSCHAR string to a LSUTFX string. _pwcRet must be long enough to hold the converted string.

Parameters:
_pcSrcThe source string.
_pwcRetThe destination string.
Returns:
Returns the converted string.
template<class T >
static T LSE_CALL lsstd::CStd::Clamp ( _tValue,
_tLow,
_tHigh 
) [inline, static]

Clamps the given value between the given range.

Parameters:
_tValueThe value to clamp.
_tLowLower limit for the clamped value.
_tHighUpper limit for the clamped value.
Returns:
Returns the given value clamped within the given range.
LSE_INLINE LSUINT32 LSE_CALL lsstd::CStd::CountBits ( LSUINT32  _ui32Value) [static]

Counts the number of bits in a given 32-bit value.

Parameters:
_ui32ValueThe values whose total number of set bits is to be calculated.
Returns:
Returns the number of bits set in the given value.
static LSVOID LSE_CALL lsstd::CStd::DebugPrintA ( const LSCHAR *  _pcString) [static]

Print a UTF-8 string to the debug console.

Parameters:
_pcStringString to print.
static LSVOID LSE_CALL lsstd::CStd::DebugPrintW ( const LSUTFX _pwcString) [static]

Print a wide-character string to the debug console.

Parameters:
_pwcStringString to print.
static LSCHAR* LSE_CALL lsstd::CStd::FtoA ( LSCHAR *  _pcBuffer,
LSUINT32  _ui32MaxLen,
LSDOUBLE  _dValue,
LSUINT32  _ui32Precision = 6UL,
LSINT8  _i8Format = 'f' 
) [static]

Converts a floating-point value to a string.

Parameters:
_pcBufferThe buffer to fill with the decoded string. A NULL character is always appended unless _ui32MaxLen is 0.
_ui32MaxLenThe maximum number of characters to write, including the terminating NULL.
_dValueThe value to decode.
_ui32PrecisionThe precision to use during decoding. If _i8Format is 'e' or 'E', _ui32Precision specifies the number of digits to be printed after the decimal point. If _i8Format is 'g' or 'G', _ui32Precision specifies the maximum number of significant digits printed. If _i8Format is 'f', _ui32Precision specifies the number of digits after the decimal point.
_i8FormatCan be 'e', 'E', 'f', 'g', or 'G'.
Returns:
Returns _pwcBuffer.
static LSUTFX* LSE_CALL lsstd::CStd::FtoW ( LSUTFX _pwcBuffer,
LSUINT32  _ui32MaxLen,
LSDOUBLE  _dValue,
LSUINT32  _ui32Precision = 6UL,
LSINT8  _i8Format = 'f' 
) [static]

Converts a floating-point value to a string.

Parameters:
_pwcBufferThe buffer to fill with the decoded string. A NULL character is always appended unless _ui32MaxLen is 0.
_ui32MaxLenThe maximum number of characters to write, including the terminating NULL.
_dValueThe value to decode.
_ui32PrecisionThe precision to use during decoding. If _i8Format is 'e' or 'E', _ui32Precision specifies the number of digits to be printed after the decimal point. If _i8Format is 'g' or 'G', _ui32Precision specifies the maximum number of significant digits printed. If _i8Format is 'f', _ui32Precision specifies the number of digits after the decimal point.
_i8FormatCan be 'e', 'E', 'f', 'g', or 'G'.
Returns:
Returns _pwcBuffer.
LSE_INLINE LSUINT32 LSE_FCALL lsstd::CStd::GetLowestPo2 ( LSUINT32  _ui32Value) [static]

Get the lowest power-of-2 value not below the given input value.

Parameters:
_ui32ValueValue for which to derive the lowest power-of-2 value not under this value.
Returns:
Returns the lowest power-of-2 value not below the given input value.
LSE_INLINE LSUINT32 LSE_FCALL lsstd::CStd::HighestBit ( LSUINT64  _ui64Value) [static]

Get the highest bit set in a raw value.

Parameters:
_ui64ValueThe value whose highest unsigned bit is to be checked.
Returns:
Returns the highest bit set in the value.
LSE_INLINE LSUINT32 LSE_FCALL lsstd::CStd::HighestBit ( LSUINT32  _ui32Value) [static]

Get the highest bit set in a raw value.

Parameters:
_ui32ValueThe value whose highest unsigned bit is to be checked.
Returns:
Returns the highest bit set in the value.
static LSCHAR* LSE_CALL lsstd::CStd::I32toA ( LSINT32  _i32Value,
LSCHAR *  _pcRet,
LSUINT32  _ui32Radix = 10 
) [static]

Converts an integer to a string using the given radix. Unlike the standard CRT functions, this will put a negative sign at the front of any negative number in any radix. The CRT functions will only negate numbers in radix 10.

Parameters:
_i32ValueNumber to be converted.
_pcRetString result.
_ui32RadixBase of value, which must be in the range from 2 to 36.
Returns:
Returns the given string.
static LSUTFX* LSE_CALL lsstd::CStd::I32toW ( LSINT32  _i32Value,
LSUTFX _pwcRet,
LSUINT32  _ui32Radix = 10 
) [static]

Converts an integer to a wide-character string using the given radix. Unlike the standard CRT functions, this will put a negative sign at the front of any negative number in any radix. The CRT functions will only negate numbers in radix 10.

Parameters:
_i32ValueNumber to be converted.
_pwcRetString result.
_ui32RadixBase of value, which must be in the range from 2 to 36.
Returns:
Returns the given string.
static LSCHAR* LSE_CALL lsstd::CStd::I64toA ( LSINT64  _i64Value,
LSCHAR *  _pcRet,
LSUINT32  _ui32Radix = 10 
) [static]

Converts an integer to a string using the given radix. Unlike the standard CRT functions, this will put a negative sign at the front of any negative number in any radix. The CRT functions will only negate numbers in radix 10.

Parameters:
_i64ValueNumber to be converted.
_pcRetString result.
_ui32RadixBase of value, which must be in the range from 2 to 36.
Returns:
Returns the given string.
static LSUTFX* LSE_CALL lsstd::CStd::I64toW ( LSINT64  _i64Value,
LSUTFX _pwcRet,
LSUINT32  _ui32Radix = 10 
) [static]

Converts an integer to a wide-character string using the given radix. Unlike the standard CRT functions, this will put a negative sign at the front of any negative number in any radix. The CRT functions will only negate numbers in radix 10.

Parameters:
_i64ValueNumber to be converted.
_pwcRetString result.
_ui32RadixBase of value, which must be in the range from 2 to 36.
Returns:
Returns the given string.
static LSBOOL LSE_CALL lsstd::CStd::IsAlNum ( LSUTFX  _wcChar) [static]

Determines if the given wide character is alpha-numeric.

Parameters:
_wcCharCharacter to test.
Returns:
Returns a non-zero value if either IsAlpha() or IsDigit() is true for _wcChar, that is, if _wcChar is within the ranges A-Z, a-z, or 0-9.
static LSBOOL LSE_CALL lsstd::CStd::IsAlNum ( LSCHAR  _cChar) [static]

Determines if the given character is alpha-numeric.

Parameters:
_cCharCharacter to test.
Returns:
Returns a non-zero value if either IsAlpha() or IsDigit() is true for _cChar, that is, if _cChar is within the ranges A-Z, a-z, or 0-9.
static LSBOOL LSE_CALL lsstd::CStd::IsAlpha ( LSCHAR  _cChar) [static]

Determines if the given character is an alpha character.

Parameters:
_cCharCharacter to test.
Returns:
Returns a non-zero value if _cChar is within the ranges A-Z or a-z.
static LSBOOL LSE_CALL lsstd::CStd::IsAlpha ( LSUTFX  _wcChar) [static]

Determines if the given wide character is an alpha character.

Parameters:
_wcCharCharacter to test.
Returns:
Returns a non-zero value if _wcChar is within the ranges A-Z or a-z.
static LSBOOL LSE_CALL lsstd::CStd::IsDigit ( LSCHAR  _cChar) [static]

Determines if the given character is a digit.

Parameters:
_cCharCharacter to test.
Returns:
Returns a non-zero value if _cChar is a decimal digit (0-9).
static LSBOOL LSE_CALL lsstd::CStd::IsDigit ( LSUTFX  _wcChar) [static]

Determines if the given wide character is a digit.

Parameters:
_wcCharCharacter to test.
Returns:
Returns a non-zero value if _wcChar is a decimal digit (0-9).
static LSBOOL LSE_CALL lsstd::CStd::IsIdentifier ( const LSUTFX _pwcStr) [static]

Determines if the given NULL-terminated string is a valid identifier. Identifiers can consist only of characters _, A-Z, a-z, and 0-9, and the first character may not be a digit.

Parameters:
_pwcStrThe string to check for being an identifier.
Returns:
Returns true if the given string is a valid identifier.
static LSBOOL LSE_CALL lsstd::CStd::IsIdentifier ( const LSCHAR *  _pcStr) [static]

Determines if the given NULL-terminated string is a valid identifier. Identifiers can consist only of characters _, A-Z, a-z, and 0-9, and the first character may not be a digit.

Parameters:
_pcStrThe string to check for being an identifier.
Returns:
Returns true if the given string is a valid identifier.
static LSBOOL LSE_CALL lsstd::CStd::IsWhitespace ( LSUTFX  _wcChar) [static]

Determines if the given wide character is a whitespace character.

Parameters:
_wcCharCharacter to test.
Returns:
Returns a non-zero value if _wcChar is a white-space character (0x09-0x0D or 0x20).
static LSBOOL LSE_CALL lsstd::CStd::IsWhitespace ( LSCHAR  _cChar) [static]

Determines if the given character is a whitespace character.

Parameters:
_cCharCharacter to test.
Returns:
Returns a non-zero value if _cChar is a white-space character (0x09-0x0D or 0x20).
template<class T >
static T LSE_CALL lsstd::CStd::Max ( _tLeft,
_tRight 
) [inline, static]

Maximum between 2 values.

Parameters:
_tLeftLeft value.
_tRightRight value.
Returns:
Returns the maximum between the two values.
static const LSVOID* LSE_CALL lsstd::CStd::MemChr ( const LSVOID *  _pvBuffer,
LSUINT8  _ui8Value,
LSUINTPTR  _uiptrSize 
) [static]

Searches within the first _uiptrSize bytes of the block of memory to which _pvBuffer points for the first occurrence of _ui8Value, and returns a pointer to it.

Parameters:
_pvBufferThe buffer to search.
_ui8ValueThe value to find.
_uiptrSizeMaximum number of bytes to search.
Returns:
Returns a pointer to the found byte or NULL if it was not found.
static LSVOID* LSE_CALL lsstd::CStd::MemChr ( LSVOID *  _pvBuffer,
LSUINT8  _ui8Value,
LSUINTPTR  _uiptrSize 
) [static]

Searches within the first _uiptrSize bytes of the block of memory to which _pvBuffer points for the first occurrence of _ui8Value, and returns a pointer to it.

Parameters:
_pvBufferThe buffer to search.
_ui8ValueThe value to find.
_uiptrSizeMaximum number of bytes to search.
Returns:
Returns a pointer to the found byte or NULL if it was not found.
static LSINT32 LSE_CALL lsstd::CStd::MemCmp ( const LSVOID *  _pvBuf0,
const LSVOID *  _pvBuf1,
LSUINTPTR  _uiptrSize 
) [static]

Compare the memory at one location with the memory at another location. Performs a lexicographic comparison.

Parameters:
_pvBuf0Buffer to compare.
_pvBuf1Buffer to compare.
_uiptrSizeNumber of bytes to compare.
Returns:
Returns the lexicographic relationship between the given buffers.
static LSBOOL LSE_CALL lsstd::CStd::MemCmpF ( const LSVOID *  _pvBuf0,
const LSVOID *  _pvBuf1,
LSUINTPTR  _uiptrSize 
) [static]

Compare the memory at one location with the memory at another location. Returns only true or false. Does not perform a lexicographic comparison.

Parameters:
_pvBuf0Buffer to compare.
_pvBuf1Buffer to compare.
_uiptrSizeNumber of bytes to compare.
Returns:
Returns true if the buffers' contents are an exact match, false otherwise.
static LSVOID* LSE_CALL lsstd::CStd::MemCpy ( LSVOID *  _pvDst,
const LSVOID *  _pvSrc,
LSUINTPTR  _uiptrSize 
) [static]

Copy memory. Does not check for overlap. If memory can overlap, use MemMove() instead. The destination buffer must be large enough to hold its new contents.

Parameters:
_pvDstDestination buffer.
_pvSrcBuffer from which to copy.
_uiptrSizeNumber of bytes to copy.
Returns:
Returns the destination buffer.
static LSVOID* LSE_CALL lsstd::CStd::MemMove ( LSVOID *  _pvDst,
const LSVOID *  _pvSrc,
LSUINTPTR  _uiptrSize 
) [static]

Copy overlapping memory. The destination buffer must be large enough to hold its new contents.

Parameters:
_pvDstDestination buffer.
_pvSrcBuffer from which to copy.
_uiptrSizeNumber of bytes to copy.
Returns:
Returns the destination buffer.
static LSVOID LSE_CALL lsstd::CStd::MemSet ( LSVOID *  _pvDst,
LSUINT8  _ui8Value,
LSUINTPTR  _uiptrSize 
) [static]

Fill memory with a given byte value.

Parameters:
_pvDstBuffer to fill.
_ui8ValueValue with which to fill the buffer.
_uiptrSizeNumber of bytes to fill.
template<class T >
static T LSE_CALL lsstd::CStd::Min ( _tLeft,
_tRight 
) [inline, static]

Minimum between 2 values.

Parameters:
_tLeftLeft value.
_tRightRight value.
Returns:
Returns the minimum between the two values.
static LSUINT32 LSE_CALL lsstd::CStd::NextUtf16Char ( const LSUTF16 *  _putf16Char,
LSUINT32  _ui32Len,
LSUINT32 *  _pui32Size = 0 
) [static]

Get the next UTF-16 character from a UTF-16 string.

Parameters:
_putf16CharPointer to the next character to decode. String must be in UTF-16 format.
_ui32LenLength, in LSUTF16 units, of the string. This is not the number of Unicode characters, but actual the number of LSUTF16 characters in the buffer.
_pui32SizeIf not NULL, this holds the returned size of the character in LSUTF16 units.
Returns:
Returns an LSUINT32 value representing the decoded Unicode character. Also returns the size of the character in LSUTF16 units. Returns LSSUTF_INVALID for invalid characters.
LSE_INLINE LSUINT32 LSE_CALL lsstd::CStd::NextUtf32Char ( const LSUTF32 *  _putf32Char,
LSUINT32  _ui32Len,
LSUINT32 *  _pui32Size = 0 
) [static]

Get the next UTF-32 character from a UTF-32 string.

Parameters:
_putf32CharPointer to the next character to decode. String must be in UTF-32 format.
_ui32LenLength, in LSUTF32 units, of the string. This is not the number of Unicode characters, but actual the number of LSUTF32 characters in the buffer.
_pui32SizeIf not NULL, this holds the returned size of the character in LSUTF32 units. However, the UTF-32 coding scheme always uses 1 LSUTF32 character per Unicode character; therefore, this value, if not NULL, will always be set to 1. It is here only for compatibility with the other UTF functions.
Returns:
Returns an LSUINT32 value representing the decoded Unicode character. Also returns the size of the character in LSUTF32 units.
static LSUINT32 LSE_CALL lsstd::CStd::NextUtf8Char ( const LSUTF8 _putf8Char,
LSUINT32  _ui32Len,
LSUINT32 *  _pui32Size = 0 
) [static]

Get the next UTF-8 character from a UTF-8 string.

Parameters:
_putf8CharPointer to the next character to decode. String must be in UTF-8 format.
_ui32LenLength, in LSUTF8 units, of the string. This is not the number of Unicode characters, but actual the number of LSUTF8 characters in the buffer.
_pui32SizeIf not NULL, this holds the returned size of the character in LSUTF8 units.
Returns:
Returns an LSUINT32 value representing the decoded Unicode character. Also returns the size of the character in LSUTF8 units. Returns LSSUTF_INVALID for invalid characters.
static LSVOID LSE_CALL lsstd::CStd::PrintError ( LSSTD_ERRORS  _eError) [static]

Prints an error given an error code. LSSTD_E_SUCCESS prints nothing.

Parameters:
_eErrorThe error code to print to the debug console.
static LSUINT32 LSE_CALL lsstd::CStd::RawUnicodeToUtf16 ( LSUTF16 *  _putf16Dst,
const LSUINT32 *  _pui32Src,
LSUINT32  _ui32MaxLen 
) [static]

Convert a raw 32-bit Unicode string to a UTF-16 string. The input string must be NULL-terminated, and the output string will always be appended with a NULL.

Parameters:
_putf16DstThe destination buffer.
_pui32SrcThe NULL-terminated source string.
_ui32MaxLenThe maximum number of characters _putf16Dst can store. This is the total number of LSUTF16 characters allocated in the buffer.
Returns:
Returns the number of LSUTF16 characters output to the buffer, such that the return value, treated as an index into an array of LSUTF16 characters, will index the NULL character in the returned string.
static LSUINT32 LSE_CALL lsstd::CStd::RawUnicodeToUtf16Char ( LSUINT32  _ui32Raw,
LSUINT32 &  _ui32Len 
) [static]

Convert a raw 32-bit Unicode character to a UTF-16 character. Returns the UTF-16 character as an LSUINT32 value. The returned length is the number LSUTF16 characters returned.

Parameters:
_ui32RawThe raw Unicode value to convert.
_ui32LenThe lengh, in LSUTF16 characters, of the converted value.
Returns:
Returns the converted character in LSUINT32 form along with the length, in units of LSUTF16, of the returned value.
static LSUINT32 LSE_CALL lsstd::CStd::RawUnicodeToUtf32 ( LSUTF32 *  _putf32Dst,
const LSUINT32 *  _pui32Src,
LSUINT32  _ui32MaxLen 
) [static]

Convert a raw 32-bit Unicode string to a UTF-32 string. The input string must be NULL-terminated, and the output string will always be appended with a NULL.

Parameters:
_putf32DstThe destination buffer.
_pui32SrcThe NULL-terminated source string.
_ui32MaxLenThe maximum number of characters _putf32Dst can store. This is the total number of LSUTF32 characters allocated in the buffer.
Returns:
Returns the number of LSUTF32 characters output to the buffer, such that the return value, treated as an index into an array of LSUTF32 characters, will index the NULL character in the returned string.
LSE_INLINE LSUINT32 LSE_CALL lsstd::CStd::RawUnicodeToUtf32Char ( LSUINT32  _ui32Raw,
LSUINT32 &  _ui32Len 
) [static]

Convert a raw 32-bit Unicode character to a UTF-32 character. Returns the UTF-32 character as an LSUINT32 value. The returned length is the number LSUTF32 characters returned, which is always 1.

Parameters:
_ui32RawThe raw Unicode value to convert.
_ui32LenThe lengh, in LSUTF32 characters, of the converted value. Always 1.
Returns:
Returns the converted character in LSUINT32 form along with the length, in units of LSUTF32, of the returned value. Because the mapping between UTF-32 and raw 32-bit Unicode values is one-to-one, this value is always 1.
static LSUINT32 LSE_CALL lsstd::CStd::RawUnicodeToUtf8 ( LSUTF8 _putf8Dst,
const LSUINT32 *  _pui32Src,
LSUINT32  _ui32MaxLen 
) [static]

Convert a raw 32-bit Unicode string to a UTF-8 string. The input string must be NULL-terminated, and the output string will always be appended with a NULL.

Parameters:
_putf8DstThe destination buffer.
_pui32SrcThe NULL-terminated source string.
_ui32MaxLenThe maximum number of characters _putf8Dst can store. This is the total number of LSUTF8 characters allocated in the buffer.
Returns:
Returns the number of LSUTF8 characters output to the buffer, such that the return value, treated as an index into an array of LSUTF8 characters, will index the NULL character in the returned string.
static LSUINT32 LSE_CALL lsstd::CStd::RawUnicodeToUtf8Char ( LSUINT32  _ui32Raw,
LSUINT32 &  _ui32Len 
) [static]

Convert a raw 32-bit Unicode character to a UTF-8 character. Returns the UTF-8 character as an LSUINT32 value. The returned length is the number LSUTF8 characters returned.

Parameters:
_ui32RawThe raw Unicode value to convert.
_ui32LenThe lengh, in LSUTF8 characters, of the converted value.
Returns:
Returns the converted character in LSUINT32 form along with the length, in units of LSUTF8, of the returned value.
LSE_INLINE LSINT64 LSE_CALL lsstd::CStd::RoundInt ( LSDOUBLE  _dValue) [static]

Rounds the given value to the nearest integer value using current rounding direction.

Parameters:
_dValueThe value to round.
Returns:
Returns the rounded value.
LSE_INLINE LSINT64 LSE_CALL lsstd::CStd::RoundInt ( LSFLOAT  _fValue) [static]

Rounds the given value to the nearest integer value using current rounding direction.

Parameters:
_fValueThe value to round.
Returns:
Returns the rounded value.
static LSVOID LSE_CALL lsstd::CStd::Sleep ( LSUINT32  _ui32Milliseconds) [static]

Sleep for the given number of milliseconds. Passing 0 causes the thread to relinquish the remainder of its time until it is scheduled to run again, at which time it will continue.

Parameters:
_ui32MillisecondsMilliseconds to sleep.
static LSUINT32 LSE_CALL lsstd::CStd::SPrintF ( LSCHAR *  _pcDest,
LSUINTPTR  _uiptrMaxLen,
const LSCHAR *  _pcFormat,
  ... 
) [static]

Print formatted text to a string.

Parameters:
_pcDestStorage location for output.
_uiptrMaxLenMaximum number of characters to store.
_pcFormatFormat-control string.
Returns:
Returns the number of characters printed, not including the terminating NULL.
static LSCHAR* LSE_CALL lsstd::CStd::StrCat ( LSCHAR *  _pcLeft,
const LSCHAR *  _pcRight 
) [static]

Combine 2 strings.

Parameters:
_pcLeftNULL-terminated destination string.
_pcRightNULL-terminated source string.
Returns:
Returns the pointer to the first parameter.
static LSINT32 LSE_CALL lsstd::CStd::StrCmp ( const LSCHAR *  _pcLeft,
const LSCHAR *  _pcRight 
) [static]

Compare a string against another lexicographically.

Parameters:
_pcLeftNULL-terminated string to compare.
_pcRightNULL-terminated string to compare.
Returns:
Returns < 0 if _pcLeft is less than _pcRight, 0 if they are equal, and > 0 if _pcLeft is greater than _pcRight, lexicographically.
static LSCHAR* LSE_CALL lsstd::CStd::StrCpy ( LSCHAR *  _pcDst,
const LSCHAR *  _pcSrc 
) [static]

Copy one string to another.

Parameters:
_pcDstDestination string.
_pcSrcSource string.
Returns:
Returns the destination string, which must be long enough to contain the copy, including the terminating NULL.
static LSUINT32 LSE_CALL lsstd::CStd::StrCSpn ( const LSCHAR *  _pcString,
const LSCHAR *  _pcCharSet 
) [static]

Returns the index of the first occurrence of a character in a string that belongs to a set of characters.

Parameters:
_pcStringNULL-terminated searched string.
_pcCharSetNULL-terminated character set.
Returns:
Returns an integer value specifying the length of the initial segment of _pcString that consists entirely of characters not in _pcCharSet. If _pcString begins with a character that is in _pcCharSet, the function returns 0. No return value is reserved to indicate an error.
static LSVOID LSE_CALL lsstd::CStd::StrDel ( LSCHAR *  _pcStr) [static]

Delete a string created by a previous call to StrDup().

Parameters:
_pcStrThe string to delete.
static LSCHAR* LSE_CALL lsstd::CStd::StrDup ( const LSCHAR *  _pcSrc) [static]

Duplicate a character string.

Parameters:
_pcSrcThe string to duplicate.
Returns:
Returns the duplicated string, which must be freed with StrDel() when no longer needed.
static LSINT32 LSE_CALL lsstd::CStd::StrICmp ( const LSCHAR *  _pcLeft,
const LSCHAR *  _pcRight 
) [static]

Compare a string case-insensitively against another lexicographically.

Parameters:
_pcLeftNULL-terminated string to compare.
_pcRightNULL-terminated string to compare.
Returns:
Returns < 0 if _pcLeft is less than _pcRight, 0 if they are equal, and > 0 if _pcLeft is greater than _pcRight, lexicographically.
static LSUINT32 LSE_CALL lsstd::CStd::StrLen ( const LSCHAR *  _pcStr) [static]

Get the length of a string.

Parameters:
_pcStrNULL-terminated string whose length is to be obtained.
Returns:
Returns the length of the string.
static LSCHAR* LSE_CALL lsstd::CStd::StrNCat ( LSCHAR *  _pcLeft,
const LSCHAR *  _pcRight,
LSUINT32  _ui32Max 
) [static]

Combine 2 strings.

Parameters:
_pcLeftNULL-terminated destination string.
_pcRightNULL-terminated source string.
_ui32MaxMaximum number of characters to append.
Returns:
Returns the pointer to the first parameter.
static LSINT32 LSE_CALL lsstd::CStd::StrNCmp ( const LSCHAR *  _pcLeft,
const LSCHAR *  _pcRight,
LSUINT32  _ui32Max 
) [static]

Compare a string against another lexicographically. Compares at most _ui32Max characters.

Parameters:
_pcLeftNULL-terminated string to compare.
_pcRightNULL-terminated string to compare.
_ui32MaxMaximum number of characters to compare.
Returns:
Returns < 0 if _pcLeft is less than _pcRight, 0 if they are equal, and > 0 if _pcLeft is greater than _pcRight, lexicographically.
static LSCHAR* LSE_CALL lsstd::CStd::StrNCpy ( LSCHAR *  _pcDst,
const LSCHAR *  _pcSrc,
LSUINT32  _ui32Max 
) [static]

Copy one string to another. Copies at most _ui32Max characters.

Parameters:
_pcDstDestination string.
_pcSrcSource string.
_ui32MaxMaximum number of characters to copy.
Returns:
Returns the destination string, which must be long enough to contain the copy, including the terminating NULL.
static LSINT32 LSE_CALL lsstd::CStd::StrNICmp ( const LSCHAR *  _pcLeft,
const LSCHAR *  _pcRight,
LSUINT32  _ui32Max 
) [static]

Compare a string case-insensitively against another lexicographically. Compares at most _ui32Max characters.

Parameters:
_pcLeftNULL-terminated string to compare.
_pcRightNULL-terminated string to compare.
_ui32MaxMaximum number of characters to compare.
Returns:
Returns < 0 if _pcLeft is less than _pcRight, 0 if they are equal, and > 0 if _pcLeft is greater than _pcRight, lexicographically.
static LSUTFX LSE_CALL lsstd::CStd::ToLower ( LSUTFX  _wcChar) [static]

Get the lower-case value of an alpha character (wide).

Parameters:
_wcCharThe character to be converted to lower case.
Returns:
The lower-case value of the input character.
static LSCHAR LSE_CALL lsstd::CStd::ToLower ( LSCHAR  _cChar) [static]

Get the lower-case value of an alpha character.

Parameters:
_cCharThe character to be converted to lower case.
Returns:
The lower-case value of the input character.
static LSUTFX LSE_CALL lsstd::CStd::ToUpper ( LSUTFX  _wcChar) [static]

Get the upper-case value of an alpha character (wide).

Parameters:
_wcCharThe character to be converted to upper case.
Returns:
The upper-case value of the input character.
static LSCHAR LSE_CALL lsstd::CStd::ToUpper ( LSCHAR  _cChar) [static]

Get the upper-case value of an alpha character.

Parameters:
_cCharThe character to be converted to upper case.
Returns:
The upper-case value of the input character.
static LSCHAR* LSE_CALL lsstd::CStd::UI32toA ( LSUINT32  _ui32Value,
LSCHAR *  _pcRet,
LSUINT32  _ui32Radix = 10 
) [static]

Converts an unsigned integer to a string using the given radix.

Parameters:
_i32ValueNumber to be converted.
_pcRetString result.
_ui32RadixBase of value, which must be in the range from 2 to 36.
Returns:
Returns the given string.
static LSUTFX* LSE_CALL lsstd::CStd::UI32toW ( LSUINT32  _ui32Value,
LSUTFX _pwcRet,
LSUINT32  _ui32Radix = 10 
) [static]

Converts an unsigned integer to a wide-character string using the given radix.

Parameters:
_i32ValueNumber to be converted.
_pwcRetString result.
_ui32RadixBase of value, which must be in the range from 2 to 36.
Returns:
Returns the given string.
static LSCHAR* LSE_CALL lsstd::CStd::UI64toA ( LSUINT64  _ui64Value,
LSCHAR *  _pcRet,
LSUINT32  _ui32Radix = 10 
) [static]

Converts an unsigned integer to a string using the given radix.

Parameters:
_ui64ValueNumber to be converted.
_pcRetString result.
_ui32RadixBase of value, which must be in the range from 2 to 36.
Returns:
Returns the given string.
static LSUTFX* LSE_CALL lsstd::CStd::UI64toW ( LSUINT64  _ui64Value,
LSUTFX _pwcRet,
LSUINT32  _ui32Radix = 10 
) [static]

Converts an unsigned integer to a wide-character string using the given radix.

Parameters:
_ui64ValueNumber to be converted.
_pwcRetString result.
_ui32RadixBase of value, which must be in the range from 2 to 36.
Returns:
Returns the given string.
static LSUINT32 LSE_CALL lsstd::CStd::Utf16StrLen ( const LSUTF16 *  _putf16String) [static]

Get the length of a UTF-16 string in Unicode characters.

Parameters:
_putf16StringThe string whose length is to be determined.
Returns:
Returns the number of Unicode characters in the given UTF-16 string.
static LSUINT32 LSE_CALL lsstd::CStd::Utf16StrLenAsUtf32 ( const LSUTF16 *  _putf16String) [static]

Get the number of bytes needed to hold a UTF-16 string in UTF-32 format, including the terminating NULL.

Parameters:
_putf16StringThe string whose buffer size after conversion is to be determined.
Returns:
Returns the total number of bytes needed to hold the UTF-16 string converted to UTF-32, including the terminating NULL. This value should be used for allocation.
static LSUINT32 LSE_CALL lsstd::CStd::Utf16StrLenAsUtf8 ( const LSUTF16 *  _putf16String) [static]

Get the number of bytes needed to hold a UTF-16 string in UTF-8 format, including the terminating NULL.

Parameters:
_putf16StringThe string whose buffer size after conversion is to be determined.
Returns:
Returns the total number of bytes needed to hold the UTF-16 string converted to UTF-8, including the terminating NULL. This value should be used for allocation.
static LSUINT32 LSE_CALL lsstd::CStd::Utf16ToUnicodeRaw ( LSUINT32 *  _pui32Dst,
const LSUTF16 *  _putf16Src,
LSUINT32  _ui32MaxLen 
) [static]

Convert a UTF-16 string to a 32-bit string where every character is stored as a 32-bit value. The converted string is always appended with a NULL unless it is of 0 length.

Parameters:
_pui32DstThe destination where to store the converted string.
_putf16SrcThe NULL-terminated UTF-16 string to be converted.
_ui32MaxLenThe maximum number of characters to store.
Returns:
Returns the number of characters stored in the buffer, not including the terminating NULL.
static LSUINT32 LSE_CALL lsstd::CStd::Utf16ToUtf32 ( LSUTF32 *  _putf32Dst,
const LSUTF16 *  _putf16Src,
LSUINT32  _ui32MaxLen 
) [static]

Convert a UTF-16 string to UTF-32.

Parameters:
_putf32DstThe destination buffer.
_putf16SrcThe NULL-terminated source string.
_ui32MaxLenThe maximum number of characters _putf32Dst can store. This is the total number of LSUTF32 characters allocated in the buffer.
Returns:
Returns the number of LSUTF32 characters output to the buffer, such that the return value, treated as an index into an array of LSUTF32 characters, will index the NULL character in the returned string.
static LSUINT32 LSE_CALL lsstd::CStd::Utf16ToUtf8 ( LSUTF8 _putf8Dst,
const LSUTF16 *  _putf16Src,
LSUINT32  _ui32MaxLen 
) [static]

Convert a UTF-16 string to UTF-8.

Parameters:
_putf8DstThe destination buffer.
_putf16SrcThe NULL-terminated source string.
_ui32MaxLenThe maximum number of characters _putf8Dst can store. This is the total number of LSUTF8 characters allocated in the buffer.
Returns:
Returns the number of LSUTF8 characters output to the buffer, such that the return value, treated as an index into an array of LSUTF8 characters, will index the NULL character in the returned string.
static LSUINT32 LSE_CALL lsstd::CStd::Utf32StrLen ( const LSUTF32 *  _putf32String) [static]

Get the length of a UTF-32 string in Unicode characters.

Parameters:
_putf32StringThe string whose length is to be determined.
Returns:
Returns the number of Unicode characters in the given UTF-32 string.
static LSUINT32 LSE_CALL lsstd::CStd::Utf32StrLenAsUtf16 ( const LSUTF32 *  _putf32String) [static]

Get the number of bytes needed to hold a UTF-32 string in UTF-16 format, including the terminating NULL.

Parameters:
_putf32StringThe string whose buffer size after conversion is to be determined.
Returns:
Returns the total number of bytes needed to hold the UTF-32 string converted to UTF-16, including the terminating NULL. This value should be used for allocation.
static LSUINT32 LSE_CALL lsstd::CStd::Utf32StrLenAsUtf8 ( const LSUTF32 *  _putf32String) [static]

Get the number of bytes needed to hold a UTF-32 string in UTF-8 format, including the terminating NULL.

Parameters:
_putf32StringThe string whose buffer size after conversion is to be determined.
Returns:
Returns the total number of bytes needed to hold the UTF-32 string converted to UTF-8, including the terminating NULL. This value should be used for allocation.
static LSUINT32 LSE_CALL lsstd::CStd::Utf32ToUnicodeRaw ( LSUINT32 *  _pui32Dst,
const LSUTF32 *  _putf32Src,
LSUINT32  _ui32MaxLen 
) [static]

Convert a UTF-32 string to a 32-bit string where every character is stored as a 32-bit value. The converted string is always appended with a NULL unless it is of 0 length.

Parameters:
_pui32DstThe destination where to store the converted string.
_putf32SrcThe NULL-terminated UTF-32 string to be converted.
_ui32MaxLenThe maximum number of characters to store.
Returns:
Returns the number of characters stored in the buffer, not including the terminating NULL.
static LSUINT32 LSE_CALL lsstd::CStd::Utf32ToUtf16 ( LSUTF16 *  _putf16Dst,
const LSUTF32 *  _putf32Src,
LSUINT32  _ui32MaxLen 
) [static]

Convert a UTF-32 string to UTF-16.

Parameters:
_putf16DstThe destination buffer.
_putf32SrcThe NULL-terminated source string.
_ui32MaxLenThe maximum number of characters _putf16Dst can store. This is the total number of LSUTF16 characters allocated in the buffer.
Returns:
Returns the number of LSUTF16 characters output to the buffer, such that the return value, treated as an index into an array of LSUTF16 characters, will index the NULL character in the returned string.
static LSUINT32 LSE_CALL lsstd::CStd::Utf32ToUtf8 ( LSUTF8 _putf8Dst,
const LSUTF32 *  _putf32Src,
LSUINT32  _ui32MaxLen 
) [static]

Convert a UTF-32 string to UTF-8.

Parameters:
_putf8DstThe destination buffer.
_putf32SrcThe NULL-terminated source string.
_ui32MaxLenThe maximum number of characters _putf8Dst can store. This is the total number of LSUTF8 characters allocated in the buffer.
Returns:
Returns the number of LSUTF8 characters output to the buffer, such that the return value, treated as an index into an array of LSUTF8 characters, will index the NULL character in the returned string.
static LSUINT32 LSE_CALL lsstd::CStd::Utf8StrLen ( const LSUTF8 _putf8String) [static]

Get the length of a UTF-8 string in Unicode characters.

Parameters:
_putf8StringThe string whose length is to be determined.
Returns:
Returns the number of Unicode characters in the given UTF-8 string.
static LSUINT32 LSE_CALL lsstd::CStd::Utf8StrLenAsUtf16 ( const LSUTF8 _putf8String) [static]

Get the number of bytes needed to hold a UTF-8 string in UTF-16 format, including the terminating NULL.

Parameters:
_putf8StringThe string whose buffer size after conversion is to be determined.
Returns:
Returns the total number of bytes needed to hold the UTF-8 string converted to UTF-16, including the terminating NULL. This value should be used for allocation.
static LSUINT32 LSE_CALL lsstd::CStd::Utf8StrLenAsUtf32 ( const LSUTF8 _putf8String) [static]

Get the number of bytes needed to hold a UTF-8 string in UTF-32 format, including the terminating NULL.

Parameters:
_putf8StringThe string whose buffer size after conversion is to be determined.
Returns:
Returns the total number of bytes needed to hold the UTF-8 string converted to UTF-32, including the terminating NULL. This value should be used for allocation.
static LSUINT32 LSE_CALL lsstd::CStd::Utf8StrLenAsUtfX ( const LSUTF8 _putf8String) [static]

Get the number of bytes needed to hold a UTF-8 string in UTF-X format, including the terminating NULL.

Parameters:
_putf8StringThe string whose buffer size after conversion is to be determined.
Returns:
Returns the total number of bytes needed to hold the UTF-8 string converted to UTF-X, including the terminating NULL. This value should be used for allocation.
static LSUINT32 LSE_CALL lsstd::CStd::Utf8ToUnicodeRaw ( LSUINT32 *  _pui32Dst,
const LSUTF8 _putf8Src,
LSUINT32  _ui32MaxLen 
) [static]

Convert a UTF-8 string to a 32-bit string where every character is stored as a 32-bit value. The converted string is always appended with a NULL unless it is of 0 length.

Parameters:
_pui32DstThe destination where to store the converted string.
_putf8SrcThe NULL-terminated UTF-8 string to be converted.
_ui32MaxLenThe maximum number of characters to store.
Returns:
Returns the number of characters stored in the buffer, not including the terminating NULL.
static LSUINT32 LSE_CALL lsstd::CStd::Utf8ToUtf16 ( LSUTF16 *  _putf16Dst,
const LSUTF8 _putf8Src,
LSUINT32  _ui32MaxLen 
) [static]

Convert a UTF-8 string to UTF-16.

Parameters:
_putf16DstThe destination buffer.
_putf8SrcThe NULL-terminated source string.
_ui32MaxLenThe maximum number of characters _putf16Dst can store. This is the total number of LSUTF16 characters allocated in the buffer.
Returns:
Returns the number of LSUTF16 characters output to the buffer, such that the return value, treated as an index into an array of LSUTF16 characters, will index the NULL character in the returned string.
static LSUINT32 LSE_CALL lsstd::CStd::Utf8ToUtf32 ( LSUTF32 *  _putf32Dst,
const LSUTF8 _putf8Src,
LSUINT32  _ui32MaxLen 
) [static]

Convert a UTF-8 string to UTF-32.

Parameters:
_putf32DstThe destination buffer.
_putf8SrcThe NULL-terminated source string.
_ui32MaxLenThe maximum number of characters _putf32Dst can store. This is the total number of LSUTF32 characters allocated in the buffer.
Returns:
Returns the number of LSUTF32 characters output to the buffer, such that the return value, treated as an index into an array of LSUTF32 characters, will index the NULL character in the returned string.
static LSUINT32 LSE_CALL lsstd::CStd::Utf8ToUtfX ( LSUTFX _putfxDst,
const LSUTF8 _putf8Src,
LSUINT32  _ui32MaxLen 
) [static]

Convert a UTF-8 string to a UTF-X string. X is 16 on Windows and 32 on other platforms.

Parameters:
_putfxDstThe destination buffer.
_putf8SrcThe NULL-terminated source string.
_ui32MaxLenThe maximum number of characters _putfxDst can store. This is the total number of LSUTFX characters allocated in the buffer.
Returns:
Returns the number of LSUTF32 characters output to the buffer, such that the return value, treated as an index into an array of LSUTF32 characters, will index the NULL character in the returned string.
static LSCHAR* LSE_CALL lsstd::CStd::UtfXToUtf8 ( const LSUTFX _pwcSrc,
LSCHAR *  _pcRet,
LSUINT32  _ui32RetLen 
) [static]

Convert a UTF-X LSUTFX string to a UTF-8 LSCHAR string. X is 16 on Windows and 32 on Macintosh. These sizes match the bits in the LSUTFX type on each platform.

Parameters:
_pwcSrcThe source string.
_pcRetThe destination string.
_ui32RetLenThe length, in bytes, of the buffer to which _pcRet points.
Returns:
Returns the converted string.
static LSUINT32 LSE_CALL lsstd::CStd::UtfXToUtf8Len ( const LSUTFX _pwcSrc) [static]

Get the number of bytes needed to contain a string converted from UTF-X to UTF-8. X is 16 on Windows and 32 on Macintosh. These sizes match the bits in the LSUTFX type on each platform.

Parameters:
_pwcSrcThe source string.
Returns:
Returns the number of bytes needed to store the converted string, including the terminating NULL character.
static LSCHAR* LSE_CALL lsstd::CStd::WCharToChar ( const LSUTFX _pwcSrc,
LSCHAR *  _pcRet 
) [static]

Convert a const LSUTFX string to a LSCHAR string. _pcRet must be long enough to hold the converted string.

Parameters:
_pwcSrcThe source string.
_pcRetThe destination string.
Returns:
Returns the converted string.
static LSINT64 LSE_CALL lsstd::CStd::WHtoI64 ( const LSUTFX _pwcString) [static]

Convert a hexadecimal string to a signed 64-bit integer.

Parameters:
_pwcStringString to be converted.
Returns:
Returns the LSINT64 value produced by interpreting the input characters as a number in hexadecimal format. If the input cannot be converted to a value of that type, the return value is 0.
static LSUINT32 LSE_CALL lsstd::CStd::WSPrintF ( LSUTFX _pwcDest,
LSUINTPTR  _uiptrMaxLen,
const LSUTFX _pwcFormat,
  ... 
) [static]

Print formatted text to a string.

Parameters:
_pwcDestStorage location for output.
_uiptrMaxLenMaximum number of characters to store.
_pwcFormatFormat-control string.
Returns:
Returns the number of characters printed, not including the terminating NULL.
static LSUTFX* LSE_CALL lsstd::CStd::WStrCat ( LSUTFX _pwcLeft,
const LSUTFX _pwcRight 
) [static]

Combine 2 wide-character strings.

Parameters:
_pwcLeftNULL-terminated destination string.
_pwcRightNULL-terminated source string.
Returns:
Returns the pointer to the first parameter.
static LSINT32 LSE_CALL lsstd::CStd::WStrCmp ( const LSUTFX _pwcLeft,
const LSUTFX _pwcRight 
) [static]

Compare a wide-character string against another lexicographically.

Parameters:
_pwcLeftNULL-terminated string to compare.
_pwcRightNULL-terminated string to compare.
Returns:
Returns < 0 if _pwcLeft is less than _pwcRight, 0 if they are equal, and > 0 if _pwcLeft is greater than _pwcRight, lexicographically.
static LSUTFX* LSE_CALL lsstd::CStd::WStrCpy ( LSUTFX _pwcDst,
const LSUTFX _pwcSrc 
) [static]

Copy one wide-character string to another.

Parameters:
_pwcDstDestination string.
_pwcSrcSource string.
Returns:
Returns the destination string, which must be long enough to contain the copy, including the terminating NULL.
static LSUINT32 LSE_CALL lsstd::CStd::WStrCSpn ( const LSUTFX _pwcString,
const LSUTFX _pwcCharSet 
) [static]

Returns the index of the first occurrence of a character in a string that belongs to a set of characters.

Parameters:
_pwcStringNULL-terminated searched string.
_pwcCharSetNULL-terminated character set.
Returns:
Returns an integer value specifying the length of the initial segment of _pwcString that consists entirely of characters not in _pwcCharSet. If _pwcString begins with a character that is in _pwcCharSet, the function returns 0. No return value is reserved to indicate an error.
static LSVOID LSE_CALL lsstd::CStd::WStrDel ( LSUTFX _pwcStr) [static]

Delete a string created by a previous call to WStrDup().

Parameters:
_pwcStrThe string to delete.
static LSUTFX* LSE_CALL lsstd::CStd::WStrDup ( const LSUTFX _pwcSrc) [static]

Duplicate a wide-character string.

Parameters:
_pwcSrcThe string to duplicate.
Returns:
Returns the duplicated string, which must be freed with WStrDel() when no longer needed.
static LSINT32 LSE_CALL lsstd::CStd::WStrICmp ( const LSUTFX _pwcLeft,
const LSUTFX _pwcRight 
) [static]

Compare a wide-character string case-insensitively against another lexicographically.

Parameters:
_pwcLeftNULL-terminated string to compare.
_pwcRightNULL-terminated string to compare.
Returns:
Returns < 0 if _pwcLeft is less than _pwcRight, 0 if they are equal, and > 0 if _pwcLeft is greater than _pwcRight, lexicographically.
static LSUINT32 LSE_CALL lsstd::CStd::WStrLen ( const LSUTFX _pwcStr) [static]

Get the length of a wide-character string.

Parameters:
_pwcStrNULL-terminated string whose length is to be obtained.
Returns:
Returns the length of the string.
static LSUTFX* LSE_CALL lsstd::CStd::WStrNCat ( LSUTFX _pwcLeft,
const LSUTFX _pwcRight,
LSUINT32  _ui32Max 
) [static]

Combine 2 wide-character strings.

Parameters:
_pwcLeftNULL-terminated destination string.
_pwcRightNULL-terminated source string.
_ui32MaxMaximum number of characters to append.
Returns:
Returns the pointer to the first parameter.
static LSINT32 LSE_CALL lsstd::CStd::WStrNCmp ( const LSUTFX _pwcLeft,
const LSUTFX _pwcRight,
LSUINT32  _ui32Max 
) [static]

Compare a wide-character string against another lexicographically. Compares at most _ui32Max characters.

Parameters:
_pwcLeftString to compare.
_pwcRightString to compare.
_ui32MaxMaximum number of characters to compare.
Returns:
Returns < 0 if _pwcLeft is less than _pwcRight, 0 if they are equal, and > 0 if _pwcLeft is greater than _pwcRight, lexicographically.
static LSUTFX* LSE_CALL lsstd::CStd::WStrNCpy ( LSUTFX _pwcDst,
const LSUTFX _pwcSrc,
LSUINT32  _ui32Max 
) [static]

Copy one wide-character string to another. Copies at most _ui32Max characters.

Parameters:
_pwcDstDestination string.
_pwcSrcSource string.
_ui32MaxMaximum number of characters to copy.
Returns:
Returns the destination string, which must be long enough to contain the copy, including the terminating NULL.
static LSINT32 LSE_CALL lsstd::CStd::WStrNICmp ( const LSUTFX _pwcLeft,
const LSUTFX _pwcRight,
LSUINT32  _ui32Max 
) [static]

Compare a wide-character string case-insensitively against another lexicographically. Compares at most _ui32Max characters.

Parameters:
_pwcLeftString to compare.
_pwcRightString to compare.
_ui32MaxMaximum number of characters to compare.
Returns:
Returns < 0 if _pwcLeft is less than _pwcRight, 0 if they are equal, and > 0 if _pwcLeft is greater than _pwcRight, lexicographically.
static LSDOUBLE LSE_CALL lsstd::CStd::WtoF ( const LSUTFX _pwcString) [static]

Converts a string to double.

Parameters:
_pwcStringString to be converted.
Returns:
Returns the double value produced by interpreting the input characters as a number. The return value is 0.0 if the input cannot be converted to a value of that type.
static LSINT32 LSE_CALL lsstd::CStd::WtoI32 ( const LSUTFX _pwcString) [static]

Convert a wide-character string to a signed 32-bit integer.

Parameters:
_pwcStringString to be converted.
Returns:
Returns the LSINT32 value produced by interpreting the input characters as a number. If the input cannot be converted to a value of that type, the return value is 0.
static LSINT64 LSE_CALL lsstd::CStd::WtoI64 ( const LSUTFX _pwcString) [static]

Convert a wide-character string to a signed 64-bit integer.

Parameters:
_pwcStringString to be converted.
Returns:
Returns the LSINT64 value produced by interpreting the input characters as a number. If the input cannot be converted to a value of that type, the return value is 0.

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator