| @@ 2768-2780 (lines=13) @@ | ||
| 2765 | $replaceRegexp = "/^([a-z]|[\\xc0-\\xff][\\x80-\\xbf]*)| ([a-z]|[\\xc0-\\xff][\\x80-\\xbf]*)/"; |
|
| 2766 | ||
| 2767 | // function to use to capitalize a single char |
|
| 2768 | if ( function_exists( 'mb_strtoupper' ) ) { |
|
| 2769 | return preg_replace_callback( |
|
| 2770 | $replaceRegexp, |
|
| 2771 | [ $this, 'ucwordsCallbackMB' ], |
|
| 2772 | $str |
|
| 2773 | ); |
|
| 2774 | } else { |
|
| 2775 | return preg_replace_callback( |
|
| 2776 | $replaceRegexp, |
|
| 2777 | [ $this, 'ucwordsCallbackWiki' ], |
|
| 2778 | $str |
|
| 2779 | ); |
|
| 2780 | } |
|
| 2781 | } else { |
|
| 2782 | return ucwords( strtolower( $str ) ); |
|
| 2783 | } |
|
| @@ 2803-2815 (lines=13) @@ | ||
| 2800 | $replaceRegexp = "/^([a-z]|[\\xc0-\\xff][\\x80-\\xbf]*)|" . |
|
| 2801 | "$breaks([a-z]|[\\xc0-\\xff][\\x80-\\xbf]*)/"; |
|
| 2802 | ||
| 2803 | if ( function_exists( 'mb_strtoupper' ) ) { |
|
| 2804 | return preg_replace_callback( |
|
| 2805 | $replaceRegexp, |
|
| 2806 | [ $this, 'ucwordbreaksCallbackMB' ], |
|
| 2807 | $str |
|
| 2808 | ); |
|
| 2809 | } else { |
|
| 2810 | return preg_replace_callback( |
|
| 2811 | $replaceRegexp, |
|
| 2812 | [ $this, 'ucwordsCallbackWiki' ], |
|
| 2813 | $str |
|
| 2814 | ); |
|
| 2815 | } |
|
| 2816 | } else { |
|
| 2817 | return preg_replace_callback( |
|
| 2818 | '/\b([\w\x80-\xff]+)\b/', |
|