Home > Java > javaTutorial > In PHP, the translation of the IntlChar getBlockCode() function is as follows:

In PHP, the translation of the IntlChar getBlockCode() function is as follows:

WBOY
Release: 2023-08-29 13:13:02
forward
1116 people have browsed it

在PHP中,IntlChar getBlockCode()函数的翻译如下:

The IntlChar getBlockCode() function is used to get the Unicode allocation block containing the value val.

Syntax

IntlChar::getBlockCode (val)
Copy after login

Parameters

  • val - An integer or character encoded as a UTF-8 string.

Return value

IntlChar getBlockCode() function returns the block value of val. Here is the list -

  • IntlChar::BLOCK_CODE_BASIC_LATIN

  • IntlChar::BLOCK_CODE_GREEK

  • IntlChar: :BLOCK_CODE_MISCELLANEOUS_SYMBOLS

##Example

The following is an example-

<?php
   var_dump(IntlChar::getBlockCode("A") === IntlChar::BLOCK_CODE_BASIC_LATIN);
   echo "<br>";
   var_dump(IntlChar::getBlockCode("PQRS") === IntlChar::BLOCK_CODE_BASIC_LATIN);
   echo "<br>";
   var_dump(IntlChar::getBlockCode("u{2603}") === IntlChar::BLOCK_CODE_MISCELLANEOUS_SYMBOLS);
?>
Copy after login

Output

The following is the output-

bool(true)
bool(false)
bool(false)
Copy after login

The above is the detailed content of In PHP, the translation of the IntlChar getBlockCode() function is as follows:. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template