File: includes/utf/utf_tools.php
Unmodified
Added
Modified
Removed
Line 22 | Line 22 |
---|
setlocale(LC_CTYPE, 'C');
/**
|
setlocale(LC_CTYPE, 'C');
/**
|
* Setup the UTF-8 portability layer
| * UTF-8 portability layer is provided by * symfony/polyfill-mbstring, symfony/polyfill-intl-normalizer, symfony/polyfill-php72
|
*/
|
*/
|
Patchwork\Utf8\Bootup::initUtf8Encode(); Patchwork\Utf8\Bootup::initMbstring(); Patchwork\Utf8\Bootup::initIntl();
| |
/** * UTF-8 tools
| /** * UTF-8 tools
|
Line 71 | Line 69 |
---|
else { return mb_strpos($str, $needle, $offset);
|
else { return mb_strpos($str, $needle, $offset);
|
| } }
/** * UTF-8 aware alternative to stripos * @ignore */ function utf8_stripos($str, $needle, $offset = null) { if (is_null($offset)) { return mb_stripos($str, $needle); } else { return mb_stripos($str, $needle, $offset);
|
} }
| } }
|
Line 171 | Line 185 |
---|
* Make a string's first character uppercase * * @author Harry Fuecks
|
* Make a string's first character uppercase * * @author Harry Fuecks
|
* @param string
| * @param string $str
|
* @return string with first character as upper case (if applicable) */ function utf8_ucfirst($str)
| * @return string with first character as upper case (if applicable) */ function utf8_ucfirst($str)
|