Y
Hacker News
new
|
ask
|
show
|
jobs
by
Zancarius
4542 days ago
strlen and strpos are two fairly commonly used functions that come to mind.
1 comments
desas
4542 days ago
Use mb_strlen and mb_strpos instead where the string may contain multibyte characters.
link
Zancarius
4542 days ago
Or patchwork/utf8 [1] since it handles fallback in the event mb_* isn't installed and can utilize several other libs.
[1]
https://github.com/nicolas-grekas/Patchwork-UTF8
link