Skip to content

Commit 5cb3993

Browse files
committed
Misc: Removed dependency to Ctype.
1 parent cc47080 commit 5cb3993

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/Context.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,9 +397,12 @@ public static function isString($str)
397397
*/
398398
public static function isSeparator($str)
399399
{
400-
// NOTES: Only ASCII characters may be separators.
400+
// NOTES: Only non alphanumeric ASCII characters may be separators.
401401
// `~` is the last printable ASCII character.
402-
return ($str <= '~') && (!ctype_alnum($str)) && ($str !== '_');
402+
return ($str <= '~') && ($str !== '_')
403+
&& (($str < '0') || ($str > '9'))
404+
&& (($str < 'a') || ($str > 'z'))
405+
&& (($str < 'A') || ($str > 'Z'));
403406
}
404407

405408
/**

0 commit comments

Comments
 (0)