Function __global->cms_mb_strlen

Definitions

sources/global3.php

  • Get string length, with utf-8 awareness where possible/required.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$in string No No required parameter N/A N/A The string to get the length of
$force boolean No No False N/A N/A Whether to force unicode as on

Returns

  • The string length
  • Type: integer
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get string length, with utf-8 awareness where possible/required.
 *
 * @param  string $in The string to get the length of
 * @param  boolean $force Whether to force unicode as on
 * @return integer The string length
 */

function cms_mb_strlen(string $in, bool $force = false) : int