Function Reference: geodir_utf8_strwidth

Summary

Get the width of string.

Package

Geodirectory

Parameters

$str
(string) (required) The string being decoded.

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

Default: “UTF-8”

Return Values

(string)
  • The width of string.

Change Log

Since: 1.6.18

Source File

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

Source Code

function geodir_utf8_strwidth( $str, $encoding = 'UTF-8' ) {
	if ( function_exists( 'mb_strwidth' ) ) {
		return mb_strwidth( $str, $encoding );
	}

	return geodir_utf8_strlen( $str, $encoding );
}