mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Cleanup.
This commit is contained in:
@@ -100,46 +100,52 @@ namespace bx
|
||||
void clear();
|
||||
};
|
||||
|
||||
///
|
||||
/// Retruns true if character is part of space set.
|
||||
bool isSpace(char _ch);
|
||||
|
||||
///
|
||||
/// Returns true if string view contains only space characters.
|
||||
bool isSpace(const StringView& _str);
|
||||
|
||||
///
|
||||
/// Retruns true if character is uppercase.
|
||||
bool isUpper(char _ch);
|
||||
|
||||
///
|
||||
/// Returns true if string view contains only uppercase characters.
|
||||
bool isUpper(const StringView& _str);
|
||||
|
||||
///
|
||||
/// Retruns true if character is lowercase.
|
||||
bool isLower(char _ch);
|
||||
|
||||
///
|
||||
/// Returns true if string view contains only lowercase characters.
|
||||
bool isLower(const StringView& _str);
|
||||
|
||||
///
|
||||
/// Returns true if character is part of alphabet set.
|
||||
bool isAlpha(char _ch);
|
||||
|
||||
///
|
||||
/// Retruns true if string view contains only alphabet characters.
|
||||
bool isAlpha(const StringView& _str);
|
||||
|
||||
///
|
||||
/// Returns true if character is part of numeric set.
|
||||
bool isNumeric(char _ch);
|
||||
|
||||
///
|
||||
/// Retruns true if string view contains only numeric characters.
|
||||
bool isNumeric(const StringView& _str);
|
||||
|
||||
///
|
||||
/// Returns true if character is part of alpha numeric set.
|
||||
bool isAlphaNum(char _ch);
|
||||
|
||||
///
|
||||
/// Returns true if string view contains only alpha-numeric characters.
|
||||
bool isAlphaNum(const StringView& _str);
|
||||
|
||||
///
|
||||
/// Returns true if character is part of hexadecimal set.
|
||||
bool isHexNum(char _ch);
|
||||
|
||||
/// Returns true if string view contains only hexadecimal characters.
|
||||
bool isHexNum(const StringView& _str);
|
||||
|
||||
/// Returns true if character is printable.
|
||||
bool isPrint(char _ch);
|
||||
|
||||
///
|
||||
/// Returns true if string vieww contains only printable characters.
|
||||
bool isPrint(const StringView& _str);
|
||||
|
||||
///
|
||||
|
||||
@@ -54,7 +54,18 @@ namespace bx
|
||||
|
||||
bool isAlphaNum(char _ch)
|
||||
{
|
||||
return isAlpha(_ch) || isNumeric(_ch);
|
||||
return false
|
||||
|| isAlpha(_ch)
|
||||
|| isNumeric(_ch)
|
||||
;
|
||||
}
|
||||
|
||||
bool isHexNum(char _ch)
|
||||
{
|
||||
return false
|
||||
|| isInRange(toLower(_ch), 'a', 'f')
|
||||
|| isNumeric(_ch)
|
||||
;
|
||||
}
|
||||
|
||||
bool isPrint(char _ch)
|
||||
@@ -110,6 +121,11 @@ namespace bx
|
||||
return isCharTest<isAlphaNum>(_str);
|
||||
}
|
||||
|
||||
bool isHexNum(const StringView& _str)
|
||||
{
|
||||
return isCharTest<isHexNum>(_str);
|
||||
}
|
||||
|
||||
bool isPrint(const StringView& _str)
|
||||
{
|
||||
return isCharTest<isPrint>(_str);
|
||||
|
||||
Reference in New Issue
Block a user