mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 10:58:58 +00:00
Replace strchr in QUtil::is_hex_digit and is_space
This commit is contained in:
parent
6f15c8e7c5
commit
9096df74fc
@ -545,13 +545,15 @@ namespace QUtil
|
||||
inline bool
|
||||
QUtil::is_hex_digit(char ch)
|
||||
{
|
||||
return (ch && (strchr("0123456789abcdefABCDEF", ch) != nullptr));
|
||||
return ('0' <= ch && ch <= '9') || ('a' <= ch && ch <= 'f') ||
|
||||
('A' <= ch && ch <= 'F');
|
||||
}
|
||||
|
||||
inline bool
|
||||
QUtil::is_space(char ch)
|
||||
{
|
||||
return (ch && (strchr(" \f\n\r\t\v", ch) != nullptr));
|
||||
return ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t' || ch == '\f' ||
|
||||
ch == '\v';
|
||||
}
|
||||
|
||||
inline bool
|
||||
|
Loading…
Reference in New Issue
Block a user