IntlChar::isUWhiteSpace

(PHP 7)

IntlChar::isUWhiteSpaceCheck if code point has the White_Space Unicode property

Opis

public static IntlChar::isUWhiteSpace ( mixed $codepoint ) : bool

Check if a code point has the White_Space Unicode property.

This is the same as IntlChar::hasBinaryProperty($codepoint, IntlChar::PROPERTY_WHITE_SPACE)

Informacja:

This is different from both IntlChar::isspace() and IntlChar::isWhitespace().

Parametry

codepoint

Wartość typu integer dla punktu kodowego (np. 0x2603 dla U+2603 SNOWMAN) lub znak zakodowany jako string UTF-8 (np. "\u{2603}")

Zwracane wartości

Returns TRUE if codepoint has the White_Space Unicode property, FALSE if not.

Przykłady

Przykład #1 Testowanie różnych punktów kodowych

<?php
var_dump
(IntlChar::isUWhiteSpace("A"));
var_dump(IntlChar::isUWhiteSpace(" "));
var_dump(IntlChar::isUWhiteSpace("\n"));
var_dump(IntlChar::isUWhiteSpace("\t"));
var_dump(IntlChar::isUWhiteSpace("\u{00A0}"));
?>

Powyższy przykład wyświetli:

bool(false)
bool(true)
bool(true)
bool(true)
bool(true)

Zobacz też:

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top