This commit is contained in:
Branimir Karadžić
2018-02-20 11:06:59 -08:00
parent efddea57f8
commit cfc6b32d10

View File

@@ -148,22 +148,22 @@ namespace bx
/// Returns true if string vieww contains only printable characters.
bool isPrint(const StringView& _str);
///
/// Retruns lower case character representing _ch.
char toLower(char _ch);
///
/// Lower case string in place assuming length passed is valid.
void toLowerUnsafe(char* _inOutStr, int32_t _len);
///
/// Lower case string in place.
void toLower(char* _inOutStr, int32_t _max = INT32_MAX);
///
/// Returns upper case character representing _ch.
char toUpper(char _ch);
///
/// Upper case string in place assuming length passed is valid.
void toUpperUnsafe(char* _inOutStr, int32_t _len);
///
/// Uppre case string in place.
void toUpper(char* _inOutStr, int32_t _max = INT32_MAX);
/// String compare.
@@ -200,13 +200,13 @@ namespace bx
/// Find substring in string. Case insensitive. Limit search to _max characters.
const char* strFindI(const StringView& _str, const StringView& _find, int32_t _num = INT32_MAX);
///
/// Returns string view with characters _chars trimmed from left.
StringView strLTrim(const StringView& _str, const StringView& _chars);
///
/// Returns string view with characters _chars trimmed from right.
StringView strRTrim(const StringView& _str, const StringView& _chars);
///
/// Returns string view with characters _chars trimmed from left and right.
StringView strTrim(const StringView& _str, const StringView& _chars);
/// Find new line. Returns pointer after new line terminator.
@@ -244,10 +244,12 @@ namespace bx
/// enough space had been available.
int32_t vsnprintf(char* _out, int32_t _max, const char* _format, va_list _argList);
///
/// Cross platform implementation of snprintf that returns number of
/// characters which would have been written to the final string if
/// enough space had been available.
int32_t snprintf(char* _out, int32_t _max, const char* _format, ...);
///
/// Templatized snprintf
template <typename Ty>
void stringPrintfVargs(Ty& _out, const char* _format, va_list _argList);
@@ -262,37 +264,37 @@ namespace bx
/// Convert size in bytes to human readable string kibi units.
int32_t prettify(char* _out, int32_t _count, uint64_t _value, Units::Enum _units = Units::Kibi);
///
/// Converts bool value to string.
int32_t toString(char* _out, int32_t _max, bool _value);
///
/// Converts double value to string.
int32_t toString(char* _out, int32_t _max, double _value);
///
/// Converts 32-bit integer value to string.
int32_t toString(char* _out, int32_t _max, int32_t _value, uint32_t _base = 10);
///
/// Converts 64-bit integer value to string.
int32_t toString(char* _out, int32_t _max, int64_t _value, uint32_t _base = 10);
///
/// Converts 32-bit unsigned integer value to string.
int32_t toString(char* _out, int32_t _max, uint32_t _value, uint32_t _base = 10);
///
/// Converts 64-bit unsigned integer value to string.
int32_t toString(char* _out, int32_t _max, uint64_t _value, uint32_t _base = 10);
///
/// Converts string to bool value.
bool fromString(bool* _out, const StringView& _str);
///
/// Converts string to float value.
bool fromString(float* _out, const StringView& _str);
///
/// Converts string to double value.
bool fromString(double* _out, const StringView& _str);
///
/// Converts string to 32-bit integer value.
bool fromString(int32_t* _out, const StringView& _str);
///
/// Converts string to 32-bit unsigned integer value.
bool fromString(uint32_t* _out, const StringView& _str);
} // namespace bx