Use mb_substr instead of substr
Status: Alpha
Brought to you by:
mrasnika
in function _string,
I think it should be mb_substr instead of substr to be work with any other language than English. Drupal use function truncate_utf8 http://api.drupal.org/api/function/truncate_utf8/6 If use this with Thai language it work fine, but not sure about the others.
Same applies for the length of a string which should use mb_strlen.
But not everybody have the mbstring module.
Maybe testing with function_exists before to use.