Convert a single UTF-8 character into its decimal code point.
public static toUnicodeCodepoint ( string $char ) : integer | ||
$char | string | |
return | integer |
/** * Get string with all characters defined by parameters * * Returns a string containing all UTF-8 characters starting with the * specified $start character up to the $end character with the step size * defined in $modulo. * * @param string $start * @param string $end * @param string $modulo * * @return string */ protected function getModuloCharRange($start, $end, $modulo) { $start = $this->converter->toUnicodeCodepoint($start); $end = $this->converter->toUnicodeCodepoint($end); $modulo = hexdec($modulo); $chars = ''; for ($start; $start <= $end; $start += $modulo) { $chars .= $this->converter->toUTF8Character($start); } return $chars; }