[ Index ]

PHP Cross Reference of DokuWiki




/inc/Utf8/ -> Asian.php (summary)

(no description)

File Size: 98 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Asian:: (3 methods):

Class: Asian  - X-Ref

Methods and constants to handle Asian "words"

This uses a crude regexp to determine which parts of an Asian string should be treated as words.
This is necessary because in some Asian languages a single unicode char represents a whole idea
without spaces separating them.
isAsianWords($term)   X-Ref
Check if the given term contains Asian word characters

return: bool
param: string $term

separateAsianWords($text, $sep = ' ')   X-Ref
Surround all Asian words in the given text with the given separator

return: string Text with separated asian words
param: string $text Original text containing asian words
param: string $sep the separator to use

splitAsianWords($term)   X-Ref
Split the given text into separate parts

Each part is either a non-asian string, or a single asian word

return: string[]
param: string $term