Function Reference: geodir_utf8_strlen

Summary

Get the string length.

Package

Geodirectory

Parameters

$str
(string) (required) The string being checked for length.

Default: None
$encoding
(string) (required) The encoding parameter is the character encoding.

Default: “UTF-8”

Return Values

(int)
  • Returns the number of characters in string.

Change Log

Since: 1.6.18

Source File

geodir_utf8_strlen() is located in geodirectory-functions/helper_functions.php [Line: 1114]

Source Code

function geodir_utf8_strlen( $str, $encoding = 'UTF-8' ) {
    if ( function_exists( 'mb_strlen' ) ) {
        return mb_strlen( $str, $encoding );
    }
        
    return strlen( $str );
}