HPL3/Amnesia: Rebirth/Scripting/Scripting Api/cString

From Frictional Wiki
< HPL3‎ | Amnesia: Rebirth‎ | Scripting‎ | Scripting Api
Revision as of 00:02, 16 November 2020 by Abion47 (talk | contribs) (Created page with "{{ScriptingStub}} Have some helpful descriptions to add to this class? Edit this page and add your insight to the Wiki! ==Summary== {{CodeDocSummaryTop}} {{CodeDocSummaryIte...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Have some helpful descriptions to add to this class? Edit this page and add your insight to the Wiki!

Contents

Summary

Return Type Function and Description
tString cString_AddSlashAtEnd(const tString &in asPath)
tWString cString_AddSlashAtEndW(const tWString &in asPath)
bool cString_CheckWildcardStrings(const tString &in asStr, const tString &in asWildcardStr, array<tString> &in avSubStringArray)
int cString_CountCharsInString(const tString &in aString, const tString &in aChar)
int cString_CountCharsInStringW(const tWString &in aString, const tWString &in aChar)
tWString cString_Get16BitFromArray(const tString &in asArray)
tWString cString_GetDecodedString(const tString &in asStr)
tString cString_GetFileExt(const tString &in aString)
tWString cString_GetFileExtW(const tWString &in aString)
tString cString_GetFileName(const tString &in aString)
tWString cString_GetFileNameW(const tWString &in aString)
tString cString_GetFilePath(const tString &in aString)
tString cString_GetFilePathTopFolder(const tString &in aString)
tWString cString_GetFilePathTopFolderW(const tWString &in aString)
tWString cString_GetFilePathW(const tWString &in aString)
int cString_GetFirstCharPos(const tString &in aString, int8 alChar)
int cString_GetFirstStringPos(const tString &in aString, const tString &in aChar)
int cString_GetFirstStringPosW(const tWString &in aString, const tWString &in aChar)
void cString_GetFloatVec(const tString &in asData, array<float> &inout avOutFloats, const tString &in asSepp)
uint cString_GetHash(const tString &in asStr)
uint64 cString_GetHash64(const tString &in asStr)
uint64 cString_GetHash64W(const tWString &in asStr)
uint cString_GetHashW(const tWString &in asStr)
void cString_GetIntVec(const tString &in asData, array<int> &inout avOutInts, const tString &in asSepp)
tString cString_GetLastChar(const tString &in aString)
int cString_GetLastCharPos(const tString &in aString, int8 alChar)
tWString cString_GetLastCharW(const tWString &in aString)
int cString_GetLastStringPos(const tString &in aString, const tString &in aChar)
int cString_GetLastStringPosW(const tWString &in aString, const tWString &in aChar)
tString cString_GetNumericSuffix(const tString &in asStr)
float cString_GetNumericSuffixFloat(const tString &in aString, float afDefault = 0)
float cString_GetNumericSuffixFloatW(const tWString &in aString, float afDefault = 0)
int cString_GetNumericSuffixInt(const tString &in aString, int alDefault = 0)
int cString_GetNumericSuffixIntW(const tWString &in aString, int alDefault = 0)
tWString cString_GetNumericSuffixW(const tWString &in asStr)
void cString_GetStringVec(const tString &in asData, array<tString> &inout avOutStrings, const tString &in asSepp)
tString cString_RemoveSlashAtEnd(const tString &in asPath)
tWString cString_RemoveSlashAtEndW(const tWString &in asPath)
tString cString_ReplaceCharTo(const tString &in aString, const tString &in asOldChar, const tString &in asNewChar)
tWString cString_ReplaceCharToW(const tWString &in aString, const tWString &in asOldChar, const tWString &in asNewChar)
tString cString_ReplaceStringTo(const tString &in aString, const tString &in asOldString, const tString &in asNewString)
tWString cString_ReplaceStringToW(const tWString &in aString, const tWString &in asOldString, const tWString &in asNewString)
tString cString_S16BitToUTF8(const tWString &in awsString)
tString cString_SetFileExt(const tString &in aString, const tString &in aExt)
tWString cString_SetFileExtW(const tWString &in aString, const tWString &in aExt)
tString cString_SetFilePath(const tString &in aString, const tString &in aPath)
tWString cString_SetFilePathW(const tWString &in aString, const tWString &in aPath)
tString cString_Sub(const tString &in asString, int alStart, int alCount = -1)
tWString cString_SubW(const tWString &in asString, int alStart, int alCount = -1)
tWString cString_To16Char(const tString &in asString)
tString cString_To8Char(const tWString &in awsString)
bool cString_ToBool(const tString &in asStr, bool abDefault)
cColor cString_ToColor(const tString &in asStr, const cColor &in aDefault)
float cString_ToFloat(const tString &in asStr, float afDefault)
int cString_ToInt(const tString &in asStr, int alDefault)
tString cString_ToLowerCase(const tString &in aString)
tWString cString_ToLowerCaseW(const tWString &in aString)
cMatrixf cString_ToMatrixf(const tString &in asStr, const cMatrixf &in a_mtxDefault)
tString cString_ToString(float afX, int alNumOfDecimals = -1, bool abRemoveZeros = false)
tString cString_ToString(int alX, int alPaddingZeros)
tWString cString_ToStringW(float afX, int alNumOfDecimals = -1, bool abRemoveZeros = false)
tWString cString_ToStringW(int alX, int alPaddingZeros)
tString cString_ToUpperCase(const tString &in aString)
tWString cString_ToUpperCaseW(const tWString &in aString)
cVector2f cString_ToVector2f(const tString &in asStr, const cVector2f &in avDefault)
cVector2l cString_ToVector2l(const tString &in asStr, const cVector2l &in avDefault)
cVector3f cString_ToVector3f(const tString &in asStr, const cVector3f &in avDefault)
cVector3l cString_ToVector3l(const tString &in asStr, const cVector3l &in avDefault)
cVector4f cString_ToVector4f(const tString &in asStr, const cVector4f &in avDefault)

Function Detail

cString_AddSlashAtEnd

tString cString_AddSlashAtEnd(const tString &in asPath)


Parameters

Returns:

  • tString

cString_AddSlashAtEndW

tWString cString_AddSlashAtEndW(const tWString &in asPath)


Parameters

Returns:

  • tWString

cString_CheckWildcardStrings

bool cString_CheckWildcardStrings(const tString &in asStr,
                                  const tString &in asWildcardStr,
                                  tString &in avSubStringArray)


Parameters

Returns:

  • bool

cString_CountCharsInString

int cString_CountCharsInString(const tString &in aString,
                               const tString &in aChar)


Parameters

Returns:

  • int

cString_CountCharsInStringW

int cString_CountCharsInStringW(const tWString &in aString,
                                const tWString &in aChar)


Parameters

Returns:

  • int

cString_Get16BitFromArray

tWString cString_Get16BitFromArray(const tString &in asArray)


Parameters

Returns:

  • tWString

cString_GetDecodedString

tWString cString_GetDecodedString(const tString &in asStr)


Parameters

Returns:

  • tWString

cString_GetFileExt

tString cString_GetFileExt(const tString &in aString)


Parameters

Returns:

  • tString

cString_GetFileExtW

tWString cString_GetFileExtW(const tWString &in aString)


Parameters

Returns:

  • tWString

cString_GetFileName

tString cString_GetFileName(const tString &in aString)


Parameters

Returns:

  • tString

cString_GetFileNameW

tWString cString_GetFileNameW(const tWString &in aString)


Parameters

Returns:

  • tWString

cString_GetFilePath

tString cString_GetFilePath(const tString &in aString)


Parameters

Returns:

  • tString

cString_GetFilePathTopFolder

tString cString_GetFilePathTopFolder(const tString &in aString)


Parameters

Returns:

  • tString

cString_GetFilePathTopFolderW

tWString cString_GetFilePathTopFolderW(const tWString &in aString)


Parameters

Returns:

  • tWString

cString_GetFilePathW

tWString cString_GetFilePathW(const tWString &in aString)


Parameters

Returns:

  • tWString

cString_GetFirstCharPos

int cString_GetFirstCharPos(const tString &in aString,
                            int8 alChar)


Parameters

  • aString (tString) —
  • alChar (int8) —

Returns:

  • int

cString_GetFirstStringPos

int cString_GetFirstStringPos(const tString &in aString,
                              const tString &in aChar)


Parameters

Returns:

  • int

cString_GetFirstStringPosW

int cString_GetFirstStringPosW(const tWString &in aString,
                               const tWString &in aChar)


Parameters

Returns:

  • int

cString_GetFloatVec

void cString_GetFloatVec(const tString &in asData,
                         float &inout avOutFloats,
                         const tString &in asSepp)


Parameters

Returns:

  • void

cString_GetHash

uint cString_GetHash(const tString &in asStr)


Parameters

Returns:

  • uint

cString_GetHash64

uint64 cString_GetHash64(const tString &in asStr)


Parameters

Returns:

  • uint64

cString_GetHash64W

uint64 cString_GetHash64W(const tWString &in asStr)


Parameters

Returns:

  • uint64

cString_GetHashW

uint cString_GetHashW(const tWString &in asStr)


Parameters

Returns:

  • uint

cString_GetIntVec

void cString_GetIntVec(const tString &in asData,
                       int &inout avOutInts,
                       const tString &in asSepp)


Parameters

Returns:

  • void

cString_GetLastChar

tString cString_GetLastChar(const tString &in aString)


Parameters

Returns:

  • tString

cString_GetLastCharPos

int cString_GetLastCharPos(const tString &in aString,
                           int8 alChar)


Parameters

  • aString (tString) —
  • alChar (int8) —

Returns:

  • int

cString_GetLastCharW

tWString cString_GetLastCharW(const tWString &in aString)


Parameters

Returns:

  • tWString

cString_GetLastStringPos

int cString_GetLastStringPos(const tString &in aString,
                             const tString &in aChar)


Parameters

Returns:

  • int

cString_GetLastStringPosW

int cString_GetLastStringPosW(const tWString &in aString,
                              const tWString &in aChar)


Parameters

Returns:

  • int

cString_GetNumericSuffix

tString cString_GetNumericSuffix(const tString &in asStr)


Parameters

Returns:

  • tString

cString_GetNumericSuffixFloat

float cString_GetNumericSuffixFloat(const tString &in aString,
                                    float afDefault = 0)


Parameters

  • aString (tString) —
  • afDefault (float) —

Returns:

  • float

cString_GetNumericSuffixFloatW

float cString_GetNumericSuffixFloatW(const tWString &in aString,
                                     float afDefault = 0)


Parameters

  • aString (tWString) —
  • afDefault (float) —

Returns:

  • float

cString_GetNumericSuffixInt

int cString_GetNumericSuffixInt(const tString &in aString,
                                int alDefault = 0)


Parameters

  • aString (tString) —
  • alDefault (int) —

Returns:

  • int

cString_GetNumericSuffixIntW

int cString_GetNumericSuffixIntW(const tWString &in aString,
                                 int alDefault = 0)


Parameters

  • aString (tWString) —
  • alDefault (int) —

Returns:

  • int

cString_GetNumericSuffixW

tWString cString_GetNumericSuffixW(const tWString &in asStr)


Parameters

Returns:

  • tWString

cString_GetStringVec

void cString_GetStringVec(const tString &in asData,
                          tString &inout avOutStrings,
                          const tString &in asSepp)


Parameters

Returns:

  • void

cString_RemoveSlashAtEnd

tString cString_RemoveSlashAtEnd(const tString &in asPath)


Parameters

Returns:

  • tString

cString_RemoveSlashAtEndW

tWString cString_RemoveSlashAtEndW(const tWString &in asPath)


Parameters

Returns:

  • tWString

cString_ReplaceCharTo

tString cString_ReplaceCharTo(const tString &in aString,
                              const tString &in asOldChar,
                              const tString &in asNewChar)


Parameters

Returns:

  • tString

cString_ReplaceCharToW

tWString cString_ReplaceCharToW(const tWString &in aString,
                                const tWString &in asOldChar,
                                const tWString &in asNewChar)


Parameters

Returns:

  • tWString

cString_ReplaceStringTo

tString cString_ReplaceStringTo(const tString &in aString,
                                const tString &in asOldString,
                                const tString &in asNewString)


Parameters

Returns:

  • tString

cString_ReplaceStringToW

tWString cString_ReplaceStringToW(const tWString &in aString,
                                  const tWString &in asOldString,
                                  const tWString &in asNewString)


Parameters

Returns:

  • tWString

cString_S16BitToUTF8

tString cString_S16BitToUTF8(const tWString &in awsString)


Parameters

Returns:

  • tString

cString_SetFileExt

tString cString_SetFileExt(const tString &in aString,
                           const tString &in aExt)


Parameters

Returns:

  • tString

cString_SetFileExtW

tWString cString_SetFileExtW(const tWString &in aString,
                             const tWString &in aExt)


Parameters

Returns:

  • tWString

cString_SetFilePath

tString cString_SetFilePath(const tString &in aString,
                            const tString &in aPath)


Parameters

Returns:

  • tString

cString_SetFilePathW

tWString cString_SetFilePathW(const tWString &in aString,
                              const tWString &in aPath)


Parameters

Returns:

  • tWString

cString_Sub

tString cString_Sub(const tString &in asString,
                    int alStart,
                    int alCount = -1)


Parameters

  • asString (tString) —
  • alStart (int) —
  • alCount (int) —

Returns:

  • tString

cString_SubW

tWString cString_SubW(const tWString &in asString,
                      int alStart,
                      int alCount = -1)


Parameters

  • asString (tWString) —
  • alStart (int) —
  • alCount (int) —

Returns:

  • tWString

cString_To16Char

tWString cString_To16Char(const tString &in asString)


Parameters

Returns:

  • tWString

cString_To8Char

tString cString_To8Char(const tWString &in awsString)


Parameters

Returns:

  • tString

cString_ToBool

bool cString_ToBool(const tString &in asStr,
                    bool abDefault)


Parameters

  • asStr (tString) —
  • abDefault (bool) —

Returns:

  • bool

cString_ToColor

cColor cString_ToColor(const tString &in asStr,
                       const cColor &in aDefault)


Parameters

Returns:

  • cColor

cString_ToFloat

float cString_ToFloat(const tString &in asStr,
                      float afDefault)


Parameters

  • asStr (tString) —
  • afDefault (float) —

Returns:

  • float

cString_ToInt

int cString_ToInt(const tString &in asStr,
                  int alDefault)


Parameters

  • asStr (tString) —
  • alDefault (int) —

Returns:

  • int

cString_ToLowerCase

tString cString_ToLowerCase(const tString &in aString)


Parameters

Returns:

  • tString

cString_ToLowerCaseW

tWString cString_ToLowerCaseW(const tWString &in aString)


Parameters

Returns:

  • tWString

cString_ToMatrixf

cMatrixf cString_ToMatrixf(const tString &in asStr,
                           const cMatrixf &in a_mtxDefault)


Parameters

Returns:

  • cMatrixf

cString_ToString

tString cString_ToString(float afX,
                         int alNumOfDecimals = -1,
                         bool abRemoveZeros = false)


Parameters

  • afX (float) —
  • alNumOfDecimals (int) —
  • abRemoveZeros (bool) —

Returns:

  • tString

cString_ToString

tString cString_ToString(int alX,
                         int alPaddingZeros)


Parameters

  • alX (int) —
  • alPaddingZeros (int) —

Returns:

  • tString

cString_ToStringW

tWString cString_ToStringW(float afX,
                           int alNumOfDecimals = -1,
                           bool abRemoveZeros = false)


Parameters

  • afX (float) —
  • alNumOfDecimals (int) —
  • abRemoveZeros (bool) —

Returns:

  • tWString

cString_ToStringW

tWString cString_ToStringW(int alX,
                           int alPaddingZeros)


Parameters

  • alX (int) —
  • alPaddingZeros (int) —

Returns:

  • tWString

cString_ToUpperCase

tString cString_ToUpperCase(const tString &in aString)


Parameters

Returns:

  • tString

cString_ToUpperCaseW

tWString cString_ToUpperCaseW(const tWString &in aString)


Parameters

Returns:

  • tWString

cString_ToVector2f

cVector2f cString_ToVector2f(const tString &in asStr,
                             const cVector2f &in avDefault)


Parameters

Returns:

  • cVector2f

cString_ToVector2l

cVector2l cString_ToVector2l(const tString &in asStr,
                             const cVector2l &in avDefault)


Parameters

Returns:

  • cVector2l

cString_ToVector3f

cVector3f cString_ToVector3f(const tString &in asStr,
                             const cVector3f &in avDefault)


Parameters

Returns:

  • cVector3f

cString_ToVector3l

cVector3l cString_ToVector3l(const tString &in asStr,
                             const cVector3l &in avDefault)


Parameters

Returns:

  • cVector3l

cString_ToVector4f

cVector4f cString_ToVector4f(const tString &in asStr,
                             const cVector4f &in avDefault)


Parameters

Returns:

  • cVector4f