IntlChar charDirection() function is used to display the bidirectional category value of the input value.
Syntax
int IntlChar::charDirection(val)
Copy after login
Parameters
Return
IntlChar charDirection() function returns the following bidirectional category value-
IntlChar::CHAR_DIRECTION_LEFT_TO_RIGHT
li>IntlChar::CHAR_DIRECTION_RIGHT_TO_LEFT
- ##IntlChar::CHAR_DIRECTION_EUROPEAN_NUMBER
##IntlChar::CHAR_DIRECTION_EUROPEAN_NUMBER_SEPARATOR p>
IntlChar::CHAR_DIRECTION_EUROPEAN_NUMBER_TERMINATOR IntlChar::CHAR_DIRECTION_ARABIC_NUMBER IntlChar::CHAR_DIRECTION_COMMON_NUMBER_SEPARATOR IntlChar::CHAR_DIRECTION_BLOCK_SEPARATOR IntlChar::CHAR_DIRECTION_SEGMENT_SEPARATOR IntlChar::CHAR_DIRECTION_WHITE_SPACE_NEUTRAL- < p>
IntlChar::CHAR_DIRECTION_OTHER_NEUTRAL IntlChar::CHAR_DIRECTION_LEFT_TO_RIGHT_EMBEDDING
IntlChar::CHAR_DIRECTION_LEFT_TO_RIGHT_OVERRIDE IntlChar::CHAR_DIRECTION_RIGHT_TO_LEFT_ARABIC IntlChar::CHAR_DIRECTION_RIGHT_TO_LEFT_EMBEDDING- ##IntlChar::CHAR_DIRECTION_RIGHT_TO_LEFT_OVERRIDE
##IntlChar: : Char_direction_pop_directional_format
#ain :: char_direction_non_spacing_mark
######################################################################## n EUTRAL ############# counter :: CHAR_DIRECTION_FIRST_S ############ IntlChar::CHAR_DIRECTION_LEFT_TO_RIGHT_ISOLATE############IntlChar::CHAR_DIRECTION_RIGHT_TO_LEFT_ISOLATE############IntlChar::CHAR_DIRECTION_POP_DIRECTIONAL_ISOLATE## ##########IntlChar::CHAR_DIRECTION_CHAR_DIRECTION_COUNT############Example######The following is an example -###
<?php
var_dump(IntlChar::charDirection("-"));
echo "<br>";
var_dump(IntlChar::charDirection("*"));
echo "<br>";
var_dump(IntlChar::charDirection("kjh"));
echo "<br>";
var_dump(IntlChar::charDirection("H"));
echo "<br>";
?>
Copy after login
###Output##### #The following is the output-###
int(3)
int(10)
NULL
int(0)
Copy after login
###
The above is the detailed content of In PHP, the IntlChar charDirection() function is used to return the direction attribute of a given character.. For more information, please follow other related articles on the PHP Chinese website!