HH\Lib\Str\length_l

Returns the length of the given string in characters

namespace HH\Lib\Str;

function length_l(
  \HH\Lib\Locale\Locale $locale,
  string $string,
): int;

This function may be O(1) or O(n) depending on the encoding specified by the locale (LC_CTYPE).

Parameters

  • \HH\Lib\Locale\Locale $locale
  • string $string

Returns

  • int