16 public static function left($value =
'', $chars = 1): string
21 if (!is_numeric($chars) || $chars < 0) {
25 if (is_bool($value)) {
29 return mb_substr($value, 0, $chars,
'UTF-8');
39 public static function mid($value =
'',
$start = 1, $chars = null): string
45 if (!is_numeric(
$start) ||
$start < 1 || !is_numeric($chars) || $chars < 0) {
49 if (is_bool($value)) {
53 return mb_substr($value, --
$start, $chars,
'UTF-8');
62 public static function right($value =
'', $chars = 1): string
67 if (!is_numeric($chars) || $chars < 0) {
71 if (is_bool($value)) {
75 return mb_substr($value, mb_strlen($value,
'UTF-8') - $chars, $chars,
'UTF-8');
static getFALSE()
Return the locale-specific translation of FALSE.
static getTRUE()
Return the locale-specific translation of TRUE.
static flattenSingleValue($value='')
Convert an array to a single scalar value by extracting the first element.