Skip to content

Commit

Permalink
Document that position is counted in chars not bytes
Browse files Browse the repository at this point in the history
Issue #177

Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Oct 16, 2017
1 parent 8ab57e7 commit c0d374a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Token.php
Expand Up @@ -207,6 +207,9 @@ class Token
/**
* The position in the initial string where this token started.
*
* The position is counted in chars, not bytes, so you should
* use mb_* functions to properly handle utf-8 multibyte chars.
*
* @var int
*/
public $position;
Expand Down

0 comments on commit c0d374a

Please sign in to comment.