summaryrefslogtreecommitdiffstats
path: root/src/UtfString.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/UtfString.php')
-rw-r--r--src/UtfString.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/UtfString.php b/src/UtfString.php
index 0d2e0c5..9ae70f6 100644
--- a/src/UtfString.php
+++ b/src/UtfString.php
@@ -75,7 +75,7 @@ class UtfString implements \ArrayAccess
$this->byteIdx = 0;
$this->charIdx = 0;
$this->byteLen = mb_strlen($str, '8bit');
- if (! mb_check_encoding($str, 'UTF-8')) {
+ if (!mb_check_encoding($str, 'UTF-8')) {
$this->charLen = 0;
} else {
$this->charLen = mb_strlen($str, 'UTF-8');
@@ -120,7 +120,7 @@ class UtfString implements \ArrayAccess
while ($delta++ < 0) {
do {
$byte = ord($this->str[--$this->byteIdx]);
- } while ((128 <= $byte) && ($byte < 192));
+ } while (($byte >= 128) && ($byte < 192));
--$this->charIdx;
}
}