follow-up r60743.
[lhc/web/wiklou.git] / languages / classes / LanguageYue.php
1 <?php
2 /**
3 * @ingroup Language
4 */
5 class LanguageYue extends Language {
6 function stripForSearch( $string, $doStrip = true ) {
7 wfProfileIn( __METHOD__ );
8
9 // Double-width roman characters
10 $s = self::convertDoubleWidth( $string );
11
12 if ( $doStrip == true ) {
13 // eventually this should be a word segmentation;
14 // for now just treat each character as a word.
15 // @todo Fixme: only do this for Han characters...
16 $reg = "/([\\xc0-\\xff][\\x80-\\xbf]*)/";
17 $s = self::wordSegmentation( $s, $reg );
18 }
19
20 $s = trim( $s );
21
22 // Do general case folding and UTF-8 armoring
23 $s = parent::stripForSearch( $s, $doStrip );
24 wfProfileOut( __METHOD__ );
25 return $s;
26 }
27 }