string: add ispunct
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
a95409c9ed
commit
98e8756808
@ -147,6 +147,17 @@ namespace stdex
|
||||
return chr == ' ' || chr == '\t' || chr == '\n' || chr == '\r' || chr == '\v' || chr == '\f';
|
||||
}
|
||||
|
||||
///
|
||||
/// Test if the given code unit is ASCII-punctuation
|
||||
///
|
||||
/// \param[in] chr Code unit
|
||||
///
|
||||
template <class T>
|
||||
bool ispunct(_In_ T chr)
|
||||
{
|
||||
return ('!' <= chr && chr <= '/') || (':' <= chr && chr <= '@') || ('[' <= chr && chr <= '`') || ('{' <= chr && chr <= '~');
|
||||
}
|
||||
|
||||
///
|
||||
/// Test if the given code unit is ASCII-lower-case-character
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user