Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles by Samual Sam
Page 53 of 151
IntlChar getFC_NFKC_Closure() function in PHP
The IntlChar::getFC_NFKC_Closure() function retrieves the FC_NFKC_Closure property for a given Unicode character. This property contains the string that the character maps to under NFKC (Normalization Form KC) normalization closure. Syntax IntlChar::getFC_NFKC_Closure(mixed $codepoint) Parameters codepoint − An integer codepoint value or a character encoded as a UTF−8 string. Return Value Returns the FC_NFKC_Closure property string for the given character, or null if the character has no FC_NFKC_Closure mapping. Example The following example demonstrates the function with various Unicode characters −
Read MoreIntlChar getBlockCode() function in PHP
The IntlChar::getBlockCode() function is used to get the Unicode allocation block containing the specified character value. This function helps identify which Unicode block a character belongs to, such as Basic Latin, Greek, or Miscellaneous Symbols. Syntax IntlChar::getBlockCode(mixed $codepoint) Parameters codepoint − An integer codepoint value (e.g., 0x41 for 'A') or a character encoded as a UTF-8 string (e.g., "A"). Return Value The function returns an integer representing the Unicode block code constant. Common block codes include ? IntlChar::BLOCK_CODE_BASIC_LATIN − For characters A-Z, a-z, 0-9 IntlChar::BLOCK_CODE_GREEK − For Greek ...
Read MoreIntlChar isdefined() function in PHP
The IntlChar::isdefined() function checks whether a Unicode character is defined in the Unicode standard. It determines if the given character has an assigned meaning and properties. Syntax bool IntlChar::isdefined(mixed $codepoint) Parameters codepoint − An integer or single character encoded as a UTF-8 string representing a Unicode code point. Return Value Returns TRUE if the character is defined in Unicode, FALSE otherwise, or NULL on failure (invalid input). Example The following example demonstrates checking various characters ? Output The following is the output ...
Read MoreIntlChar charDirection() function in PHP
The IntlChar charDirection() function is used to determine the bidirectional category value for a given character, which is essential for proper text rendering in multilingual applications. Syntax int IntlChar::charDirection(mixed $codepoint) Parameters $codepoint − An integer codepoint value or a character encoded as a UTF-8 string. Return Value The function returns an integer representing the bidirectional category. Common return values include ? IntlChar::CHAR_DIRECTION_LEFT_TO_RIGHT (0) − Left-to-right characters like Latin letters IntlChar::CHAR_DIRECTION_RIGHT_TO_LEFT (1) − Right-to-left characters like Arabic letters IntlChar::CHAR_DIRECTION_EUROPEAN_NUMBER (2) − European digits (0-9) IntlChar::CHAR_DIRECTION_EUROPEAN_NUMBER_SEPARATOR (3) − Separators like ...
Read MoreIntlChar toupper() function in PHP
The IntlChar::toupper() function converts a character to its Unicode uppercase equivalent. It works with single characters and returns the uppercase version if available. Syntax IntlChar::toupper($val) Parameters $val − An integer or character encoded as a UTF-8 string. Must be a single character. Return Value The function returns the converted uppercase character as a string. If the character is already uppercase or has no uppercase equivalent, the same character is returned. Returns NULL for invalid input. Example The following example demonstrates converting characters to uppercase ? ...
Read MoreIntlChar isgraph() function in PHP
The IntlChar::isgraph() function checks whether a given character is a graphic character or not. Graphic characters are visible characters that have a visual representation, excluding whitespace and control characters. Syntax bool IntlChar::isgraph(mixed $codepoint) Parameters codepoint − An integer codepoint value (e.g., 0x41 for 'A'), or a character encoded as a UTF-8 string (e.g., "A"). Return Value The IntlChar::isgraph() function returns TRUE if the codepoint is a graphic character, FALSE otherwise. Returns NULL on failure. Example The following example demonstrates checking various characters ? ...
Read MoreIntlChar::isblank() function in PHP
The IntlChar::isblank() function checks whether the entered value is a blank or horizontal space character. This function is part of PHP's Internationalization extension and follows Unicode standards for character classification. Syntax IntlChar::isblank(val) Parameters val − An integer or character encoded as a UTF-8 string representing a Unicode code point. Return Value The IntlChar::isblank() function returns TRUE if the entered value is a blank or horizontal space character, FALSE otherwise. Returns NULL on failure. Example The following example demonstrates how to use IntlChar::isblank() with different characters ? ...
Read MoreIntlChar::isWhitespace() function in PHP
The IntlChar::isWhitespace() function checks whether the given input character is a whitespace character or not. This function is part of PHP's Intl extension and follows Unicode standards for whitespace detection. Syntax IntlChar::isWhitespace(val) Parameters val − A character or integer value encoded as a UTF-8 string, or a Unicode code point. Return Value The IntlChar::isWhitespace() function returns TRUE if the character is a whitespace character, FALSE otherwise, or NULL on failure. Example The following example demonstrates how to use IntlChar::isWhitespace() with different characters ? ...
Read MoreIntlChar::charMirror() function in PHP
The IntlChar::charMirror() function finds the "mirror-image" character for bidirectional text display. This function is useful when working with text that contains characters like brackets, parentheses, or other symbols that need to be mirrored in right-to-left languages. Syntax IntlChar::charMirror(val) Parameters val − A character or integer value encoded as a UTF-8 string. Return Value The IntlChar::charMirror() function returns another Unicode code point that may serve as a mirror-image substitute, or the original codepoint itself if there is no such mapping or the codepoint does not have the ...
Read MoreIntlChar::forDigit() function in PHP
The IntlChar::forDigit() function displays the character representation of a specified digit in the specified radix (number base). It returns the ASCII code of the character that represents the digit. Syntax IntlChar::forDigit(digit, radix) Parameters digit − A number to convert to a character (0-35) radix − The radix (base) value. Must be between 2 and 36. Default is 10. Return Value The function returns the ASCII code (integer) of the character representation of the specified digit in the given radix. For digits 0-9, it returns ASCII codes 48-57 ('0'-'9'). For digits ...
Read More