The GeoBase library provides a suite of cross-platform text functions that are used in place of strcpy et al.
This allows the rest of the code to be unaware of any platform inconsistencies.
Classes
Name | Description |
---|---|
Geo::GeoFixedString | This is a simple string class template that always uses a fixed amount of memory for a single string. |
Geo::GeoString | STL string replacement. |
Geo::GeoStringView | STL string_view replacement. |
Geo::GeoTokenList | A basic replacement for 'strtok'. |
Geo::GeoTokenStream | A very simple utility class that wraps some common parsing functionality around a GeoTokenList. |
Typedefs
Name | Description |
---|---|
GeoString< char > GeoFileString | String type used for file paths. |
GeoStringView< char > GeoFileStringView | String type used for file paths. |
GeoString< char > GeoNetworkString | String type used for networking. |
GeoString< char > GeoSymbolString | String type used for internal symbol matching. |
GeoString< char > GeoUIString | String type used for user interface and feedback. |
GeoString< char > GeoUtf8FileString | String type used for file paths when ASCII is required (rare). |
Functions
Name | Description |
---|---|
ArrayToString(const Geo::GeoArray< T > &, const C *) | Function to make a string by concatenating an array of elements using IGeoStream::operator<< to convert each element to a string and placing the given separator between each element. |
CropWhitespace(GeoString< T > &) | Removes leading and trailing whitespace characters from the provided string. |
GeoAToF(const char *) | Equivalent to atof. |
GeoAToI(const char *) | Equivalent to atoi. |
GeoSPrintf(char *, size_t, const char *, ...) | Equivalent to sprintf. |
GeoStrCat(char *, size_t, const char *) | Equivalent to strcat. |
GeoStrCmp(const char *, const char *) | Equivalent to strcmp. |
GeoStrCpy(char *, size_t, const char *) | Equivalent to strcpy. |
GeoStrICmp(const char *, const char *) | Equivalent to stricmp. |
GeoStrLen(const char *) | Equivalent to strlen. |
GeoStrLwr(char *) | Equivalent to strlwr. |
GeoStrNCat(char *, size_t, const char *, size_t) | Equivalent to strncat. |
GeoStrNCmp(const char *, const char *, size_t) | Equivalent to strncmp. |
GeoStrNCpy(char *, size_t, const char *, size_t) | Equivalent to strncpy. |
GeoStrToS16(const char *) | Simple interpretation of the strtoXXX family of functions, returning a Geo::s16. |
GeoStrToS32(const char *) | Simple interpretation of the strtoXXX family of functions, returning a Geo::s32. |
GeoStrToS64(const char *) | Simple interpretation of the strtoXXX family of functions, returning a Geo::s64. |
GeoStrToU16(const char *) | Simple interpretation of the strtoXXX family of functions, returning a Geo::u16. |
GeoStrToU32(const char *) | Simple interpretation of the strtoXXX family of functions, returning a Geo::u32. |
GeoStrToU64(const char *) | Simple interpretation of the strtoXXX family of functions, returning a Geo::u64. |
GeoVSCPrintf(const char *, va_list) | Equivalent to vscprintf. |
GeoVSPrintf(char *, size_t, const char *, va_list) | Equivalent to vsprintf. |
IsWhitespace(char) | Returns whether the given character is a whitespace character. |
SplitStringToFloats(const C *) | Function to parse incoming string into an array of floats. |
SplitStringToIntegers(const C *) | Function to parse incoming string into an array of integers. |
Anchor | ||||
---|---|---|---|---|
|
Geo::GeoString<C> Geo::ArrayToString
...
public: Geo::GeoString< C > ArrayToString
(
const Geo::GeoArray< T > & arr,
const C * separator
)
...
Function to make a string by concatenating an array of elements using IGeoStream::operator<< to convert each element to a string and placing the given separator between each element.
Anchor | ||||
---|---|---|---|---|
|
void GEO_CALL Geo::CropWhitespace
...
public: void GEO_CALL CropWhitespace
(
GeoString< T > & str
)
...
Removes leading and trailing whitespace characters from the provided string.
Anchor | ||||
---|---|---|---|---|
|
double GEO_CALL Geo::GeoAToF
...
public: double GEO_CALL GeoAToF
(
const char * str
)
...
Equivalent to atof.
Anchor | ||||
---|---|---|---|---|
|
int GEO_CALL Geo::GeoAToI
...
public: int GEO_CALL GeoAToI
(
const char * str
)
...
Equivalent to atoi.
Anchor | ||||
---|---|---|---|---|
|
int GEO_CALL Geo::GeoSPrintf
...
public: int GEO_CALL GeoSPrintf
(
char * buffer,
size_t numberOfElements,
const char * format,
...
)
...
Equivalent to sprintf.
Anchor | ||||
---|---|---|---|---|
|
int GEO_CALL Geo::GeoStrCat
...
public: int GEO_CALL GeoStrCat
(
char * strDestination,
size_t numberOfElements,
const char * strSource
)
...
Equivalent to strcat.
Anchor | ||||
---|---|---|---|---|
|
int GEO_CALL Geo::GeoStrCmp
...
public: int GEO_CALL GeoStrCmp
(
const char * strA,
const char * strB
)
...
Equivalent to strcmp.
Anchor | ||||
---|---|---|---|---|
|
int GEO_CALL Geo::GeoStrCpy
...
public: int GEO_CALL GeoStrCpy
(
char * strDestination,
size_t numberOfElements,
const char * strSource
)
...
Equivalent to strcpy.
Anchor | ||||
---|---|---|---|---|
|
int GEO_CALL Geo::GeoStrICmp
...
public: int GEO_CALL GeoStrICmp
(
const char * strA,
const char * strB
)
...
Equivalent to stricmp.
Anchor | ||||
---|---|---|---|---|
|
int GEO_CALL Geo::GeoStrLen
...
public: int GEO_CALL GeoStrLen
(
const char * strSource
)
...
Equivalent to strlen.
Anchor | ||||
---|---|---|---|---|
|
int GEO_CALL Geo::GeoStrLwr
...
public: int GEO_CALL GeoStrLwr
(
char * strSrcDest
)
...
Equivalent to strlwr.
Anchor | ||||
---|---|---|---|---|
|
int GEO_CALL Geo::GeoStrNCat
...
public: int GEO_CALL GeoStrNCat
(
char * strDestination,
size_t numberOfElements,
const char * strSource,
size_t count
)
...
Equivalent to strncat.
Anchor | ||||
---|---|---|---|---|
|
int GEO_CALL Geo::GeoStrNCmp
...
public: int GEO_CALL GeoStrNCmp
(
const char * strA,
const char * strB,
size_t count
)
...
Equivalent to strncmp.
Anchor | ||||
---|---|---|---|---|
|
int GEO_CALL Geo::GeoStrNCpy
...
public: int GEO_CALL GeoStrNCpy
(
char * strDestination,
size_t numberOfElements,
const char * strSource,
size_t count
)
...
Equivalent to strncpy.
Anchor | ||||
---|---|---|---|---|
|
s16 GEO_CALL Geo::GeoStrToS16
...
public: s16 GEO_CALL GeoStrToS16
(
const char * str
)
...
Simple interpretation of the strtoXXX family of functions, returning a Geo::s16.
Anchor | ||||
---|---|---|---|---|
|
s32 GEO_CALL Geo::GeoStrToS32
...
public: s32 GEO_CALL GeoStrToS32
(
const char * str
)
...
Simple interpretation of the strtoXXX family of functions, returning a Geo::s32.
Anchor | ||||
---|---|---|---|---|
|
s64 GEO_CALL Geo::GeoStrToS64
...
public: s64 GEO_CALL GeoStrToS64
(
const char * str
)
...
Simple interpretation of the strtoXXX family of functions, returning a Geo::s64.
Anchor | ||||
---|---|---|---|---|
|
u16 GEO_CALL Geo::GeoStrToU16
...
public: u16 GEO_CALL GeoStrToU16
(
const char * str
)
...
Simple interpretation of the strtoXXX family of functions, returning a Geo::u16.
Anchor | ||||
---|---|---|---|---|
|
u32 GEO_CALL Geo::GeoStrToU32
...
public: u32 GEO_CALL GeoStrToU32
(
const char * str
)
...
Simple interpretation of the strtoXXX family of functions, returning a Geo::u32.
Anchor | ||||
---|---|---|---|---|
|
u64 GEO_CALL Geo::GeoStrToU64
...
public: u64 GEO_CALL GeoStrToU64
(
const char * str
)
...
Simple interpretation of the strtoXXX family of functions, returning a Geo::u64.
Anchor | ||||
---|---|---|---|---|
|
int GEO_CALL Geo::GeoVSCPrintf
...
public: int GEO_CALL GeoVSCPrintf
(
const char * format,
va_list argptr
)
...
Equivalent to vscprintf.
Anchor | ||||
---|---|---|---|---|
|
int GEO_CALL Geo::GeoVSPrintf
...
public: int GEO_CALL GeoVSPrintf
(
char * buffer,
size_t numberOfElements,
const char * format,
va_list argptr
)
...
Equivalent to vsprintf.
Anchor | ||||
---|---|---|---|---|
|
bool Geo::IsWhitespace
...
public: bool IsWhitespace
(
char elem
)
...
Returns whether the given character is a whitespace character.
Anchor | ||||
---|---|---|---|---|
|
GeoArray<float> Geo::SplitStringToFloats
...
public: GeoArray< float > SplitStringToFloats
(
const C * str
)
...
Function to parse incoming string into an array of floats.
The floats can be separated by any number of space characters, but no other characters should be present.
Parameters
[in] | str | Source string. |
Returns
Resulting floats.
Anchor | ||||
---|---|---|---|---|
|
GeoArray<T> Geo::SplitStringToIntegers
...
public: GeoArray< T > SplitStringToIntegers
(
const C * str
)
...
Function to parse incoming string into an array of integers.
The integers can be separated by any number of space characters, but no other characters should be present.
Parameters
[in] | str | Source string. |
Returns
Resulting integers.