IntlChar::getBidiPairedBracket
(PHP 7)
IntlChar::getBidiPairedBracket — Get the paired bracket character for a code point
説明
public static mixed IntlChar::getBidiPairedBracket
(
mixed $codepoint
)
For Bidi_Paired_Bracket_Type!=None, this is the same as IntlChar::charMirror().
Otherwise codepoint
itself is returned.
パラメータ
-
codepoint
-
コードポイントを表す integer 型の値 (例: U+2603 SNOWMAN を表す 0x2603)、あるいは UTF-8 文字列としてエンコードされた文字 (例: "\u{2603}")。
返り値
Returns the paired bracket code point, or codepoint
itself if there is no such mapping.
戻り値の型は integer になります。ただし、コードポイントを UTF-8 文字列で渡した場合は別で、その場合の返り値の型は文字列になります。
例
例1 さまざまなコードポイントの例
<?php
var_dump(IntlChar::getBidiPairedBracket(91));
var_dump(IntlChar::getBidiPairedBracket('['));
?>
参考
- IntlChar::charMirror() - Get the "mirror-image" character for a code point
IntlChar::PROPERTY_BIDI_PAIRED_BRACKET
IntlChar::PROPERTY_BIDI_PAIRED_BRACKET_TYPE