Skip to content

Commit c0d374a

Browse files
committed
Document that position is counted in chars not bytes
Issue #177 Signed-off-by: Michal Čihař <michal@cihar.com>
1 parent 8ab57e7 commit c0d374a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Token.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,9 @@ class Token
207207
/**
208208
* The position in the initial string where this token started.
209209
*
210+
* The position is counted in chars, not bytes, so you should
211+
* use mb_* functions to properly handle utf-8 multibyte chars.
212+
*
210213
* @var int
211214
*/
212215
public $position;

0 commit comments

Comments
 (0)