IntlChar::getBidiPairedBracket
(PHP 7, PHP 8)
IntlChar::getBidiPairedBracket — Get the paired bracket character for a code point
Beschreibung
$codepoint): int|string|nullMaps the specified character to its paired bracket character.
For Bidi_Paired_Bracket_Type!=None, this is the same as IntlChar::charMirror().
Otherwise codepoint itself is returned.
Parameter-Liste
-
codepoint -
Der int-Wert des Codepoints (z. B.
0x2603für U+2603 SNOWMAN) oder das Zeichen als UTF-8-String kodiert (z.B."\u").
Rückgabewerte
Returns the paired bracket code point, or codepoint itself if there is no such mapping. Returns
null on failure.
Der Rückgabetyp ist int, außer der Codepoint wurde als UTF-8-String übergeben, in welchem Fall ein string zurückgegeben wird. Bei einem Fehler wird null zurückgegeben.
Beispiele
Beispiel #1 Testen unterschiedlicher Codepoints
<?php
var_dump(IntlChar::getBidiPairedBracket(91));
var_dump(IntlChar::getBidiPairedBracket('['));
?>
Das oben gezeigte Beispiel erzeugt folgende Ausgabe:
int(93) string(1) "]"
Siehe auch
- IntlChar::charMirror() - Get the "mirror-image" character for a code point
IntlChar::PROPERTY_BIDI_PAIRED_BRACKETIntlChar::PROPERTY_BIDI_PAIRED_BRACKET_TYPE

