From 5cb399390831abf8b524fa7815537d3cafccf143 Mon Sep 17 00:00:00 2001 From: Dan Ungureanu Date: Fri, 29 Jan 2016 00:13:41 +0200 Subject: [PATCH] Misc: Removed dependency to Ctype. --- src/Context.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Context.php b/src/Context.php index c753d3c3b..7637953ab 100644 --- a/src/Context.php +++ b/src/Context.php @@ -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')); } /**