Change language

PHP IntlChar getPropertyName () function

Syntax:
string IntlChar::getPropertyName ($property, $nameChoice = IntlChar::LONG_PROPERTY_NAME)
Parameters:This function takes two parameters as above and described below:
  • $property:This parameter contains constants for the Unicode property (constants IntlChar::PROPERTY_ *)
    List of property constants:
    • IntlChar::PROPERTY_ALPHABETIC
    • IntlChar::PROPERTY_BIDI_MIRRORED
    • IntlChar::PROPERTY_BIDI_CLASS
    • IntlChar::PROPERTY_DASH
    • IntlChar::PROPERTY_IDEOGRAPHIC
    • IntlChar::PROPERTY_LOWERCASE
    • IntlChar::PROPERTY_MATH
    • IntlChar::PROPERTY_UPPERCASE
    • IntlChar::PROPERTY_WHITE_SPACE, etc.
    Apart from another Unicode property, IntlChar::PROPERTY_INVALID_CODE shall not be used.
  • $nameChoiceThis parameter contains a selector that gets the Unicode name.
Return Values:This function returns the name on success or False if the property or name selection is out of range.The programs below illustrate the IntlChar::getPropertyName() function in PHP:Program 1:
// The program illustrates the IntlChar::getPropertyName() function 
var_dump (IntlChar::getPropertyName (IntlChar::PROPERTY_BIDI_MIRRORED));  
var_dump (IntlChar::getPropertyName (IntlChar::PROPERTY_BIDI_MIRRORED, IntlChar::SHORT_PROPERTY_NAME));  
var_dump (IntlChar::getPropertyName (IntlChar::PROPERTY_BIDI_MIRRORED, IntlChar::LONG_PROPERTY_NAME));  
var_dump (IntlChar::getPropertyName (IntlChar::PROPERTY_BIDI_MIRRORED, IntlChar::LONG_PROPERTY_NAME + 1));  
?>
Exit:
string (13 ) "Bidi_Mirrored" string (6) "Bidi_M" string (13) "Bidi_Mirrored" bool (false)
Program 2:
// The program illustrates the IntlChar::getPropertyName() function 
var_dump (IntlChar::getPropertyName (IntlChar::PROPERTY_IDEOGRAPHIC));  
var_dump (IntlChar::getPropertyName (IntlChar::PROPERTY_IDEOGRAPHIC, IntlChar::SHORT_PROPERTY_NAME));  
var_dump (IntlChar::getPropertyName (IntlChar::PROPERTY_IDEOGRAPHIC, IntlChar::LONG_PROPERTY_NAME));  
var_dump (IntlChar::getPropertyName (IntlChar::PROPERTY_IDEOGRAPHIC, IntlChar::LONG_PROPERTY_NAME + 1)); ?>
Exit:
string (11 ) "Ideographic" string (4) "Ideo" string (11) "Ideographic" bool (false)
Program 3:
// The program illustrates the IntlChar::getPropertyName() function 
var_dump (IntlChar::getPropertyName (IntlChar::PROPERTY_GENERAL_CATEGORY_MASK));  
var_dump (IntlChar::getPropertyName (IntlChar::PROPERTY_GENERAL_CATEGORY_MASK, IntlChar::SHORT_PROPERTY_NAME));  
var_dump (IntlChar::getPropertyName (IntlChar::PROPERTY_GENERAL_CATEGORY_MASK, IntlChar::LONG_PROPERTY_NAME));  
var_dump (IntlChar::getPropertyName (IntlChar::PROPERTY_GENERAL_CATEGORY_MASK, IntlChar::LONG_PROPERTY_NAME + 1));  
?>
Exit:
string (21 ) "General_Category_Mask" string (3) "gcm" string (21) "General_Category_Mask" bool (false)
Link https://www.php.net/manual/en/intlchar.getpropertyname.php

Shop

Best laptop for Sims 4

$

Best laptop for Zoom

$499

Best laptop for Minecraft

$590

Best laptop for engineering student

$

Best laptop for development

$

Best laptop for Cricut Maker

$

Best laptop for hacking

$890

Best laptop for Machine Learning

$950

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers

Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method