mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-08 17:24:06 +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
|
inline bool
|
||||||
QUtil::is_hex_digit(char ch)
|
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
|
inline bool
|
||||||
QUtil::is_space(char ch)
|
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
|
inline bool
|
||||||
|
Loading…
Reference in New Issue
Block a user