wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



_wp_has_noncharacters_fallback › WordPress Function

Seit6.9.0
Veraltetn/v
_wp_has_noncharacters_fallback ( $text )
Zugriff:
  • private
Parameter:
  • (string) $text Are there noncharacters in this string?
    Erforderlich: Ja
Siehe:
  • wp_has_noncharacters()
Gibt zurück:
  • (bool) Whether noncharacters were found in the string.
Definiert in:
Codex:

Fallback support for determining if a string contains Unicode noncharacters.



Quellcode

function _wp_has_noncharacters_fallback( string $text ): bool {
	$at                = 0;
	$invalid_length    = 0;
	$has_noncharacters = false;
	$end               = strlen( $text );

	while ( $at < $end && ! $has_noncharacters ) {
		_wp_scan_utf8( $text, $at, $invalid_length, null, null, $has_noncharacters );
		$at += $invalid_length;
	}

	return $has_noncharacters;
}