[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/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):
  isAsianWords()
  separateAsianWords()
  splitAsianWords()


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

param: string $term
return: bool

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

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

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

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

param: string $term
return: string[]