You are here

static function IntegerFormatter::str_split in Currency 7.2

Splits a string in a unicode-safe way.

Parameters

string:

Return value

array|false

See also

str_split()

3 calls to IntegerFormatter::str_split()
IntegerFormatter::patternSymbols in currency/vendor/bartfeenstra/cldr/src/BartFeenstra/CLDR/IntegerFormatter.php
Converts a number pattern to an array of NumberPatternSymbol objects.
IntegerFormatter::process in currency/vendor/bartfeenstra/cldr/src/BartFeenstra/CLDR/IntegerFormatter.php
Process the pattern's symbols using a number.
IntegerFormatter::strrev in currency/vendor/bartfeenstra/cldr/src/BartFeenstra/CLDR/IntegerFormatter.php
Reverses a string in a unicode-safe way.

File

currency/vendor/bartfeenstra/cldr/src/BartFeenstra/CLDR/IntegerFormatter.php, line 262
Contains class \BartFeenstra\CLDR\IntegerFormatter.

Class

IntegerFormatter
Formats an integer according CLDR number pattern guidelines.

Namespace

BartFeenstra\CLDR

Code

static function str_split($string, $split_length = 1) {
  if ($split_length < 1) {
    return FALSE;
  }
  preg_match_all('/.{1,' . $split_length . '}/u', $string, $matches);
  return $matches[0];
}