Skip to content

Commit

Permalink
Misc: Removed dependency to Ctype.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Ungureanu committed Jan 28, 2016
1 parent cc47080 commit 5cb3993
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Context.php
Expand Up @@ -397,9 +397,12 @@ public static function isString($str)
*/
public static function isSeparator($str)
{
// NOTES: Only ASCII characters may be separators.
// NOTES: Only non alphanumeric ASCII characters may be separators.
// `~` is the last printable ASCII character.
return ($str <= '~') && (!ctype_alnum($str)) && ($str !== '_');
return ($str <= '~') && ($str !== '_')
&& (($str < '0') || ($str > '9'))
&& (($str < 'a') || ($str > 'z'))
&& (($str < 'A') || ($str > 'Z'));
}

/**
Expand Down

0 comments on commit 5cb3993

Please sign in to comment.