PHP 8.5.0 Alpha 1 available for testing

IntlChar::getBidiPairedBracket

(PHP 7, PHP 8)

IntlChar::getBidiPairedBracketDevuelve el carácter de paréntesis emparejado para un punto de código

Descripción

public static IntlChar::getBidiPairedBracket(int|string $codepoint): int|string|null

Mapea el carácter especificado a su carácter de paréntesis emparejado.

Para IntlChar::PROPERTY_BIDI_PAIRED_BRACKET_TYPE !== IntlChar::BPT_NONE, esto equivale a IntlChar::charMirror().

Parámetros

codepoint

The int codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")

Valores devueltos

Devuelve el punto de código del paréntesis emparejado, o codepoint mismo si no hay mapeo. Devuelve null en caso de error.

The return type is int unless the code point was passed as a UTF-8 string, in which case a string is returned. Returns null on failure.

Ejemplos

Ejemplo #1 Testing different code points

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

El ejemplo anterior mostrará :

int(93)
string(1) "]"

Notas

Nota:

Este método está disponible desde la versión 52 de ICU.

Ver también

add a note

User Contributed Notes

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