IntlChar::getBidiPairedBracket

(PHP 7)

IntlChar::getBidiPairedBracketGet the paired bracket character for a code point

Opis

public static IntlChar::getBidiPairedBracket ( mixed $codepoint ) : mixed

Maps 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.

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 the paired bracket code point, or codepoint itself if there is no such mapping.

Zwróconym typem będzie integer, chyba że codepoint przekazano jako łańcuch znaków UTF-8 - w tym wypadku zwrócony zostanie string.

Przykłady

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

<?php
var_dump
(IntlChar::getBidiPairedBracket(91));
var_dump(IntlChar::getBidiPairedBracket('['));
?>

Powyższy przykład wyświetli:

int(93)
string(1) "]"

Zobacz też:

  • IntlChar::charMirror() - Get the "mirror-image" character for a code point
  • IntlChar::PROPERTY_BIDI_PAIRED_BRACKET
  • IntlChar::PROPERTY_BIDI_PAIRED_BRACKET_TYPE

add a note add a note

User Contributed Notes

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