IntlChar charDirection() 函數用來顯示輸入值的雙向類別值。
int IntlChar::charDirection(val)
val - 編碼為 UTF-8 字串的整數或字元。
IntlChar charDirection() 函數傳回以下雙向類別值-
p>
IntlChar::CHAR_DIRECTION_EUROPEAN_NUMBER_TERMINATOR
IntlChar::CHAR_DIRECTION_ARABIC_NUMBER
IntlChar: :0_DIRECTION_COMMON_NU
##IntlChar::CHAR_DIRECTION_WHITE_SPACE_NEUTRAL
IntlChar:: ##Intl? IntlChar::CHAR_DIRECTION_RIGHT_TO_LEFT_ARABIC
IntlChar::CHAR_DIRECTION_RIGHT_TO_LEFT_EMBEDDING
IntlChar::CHAR_DIRECTION :CHAR_DIRECTION_POP_DIRECTIONAL_FORMAT
IntlChar::CHAR_DIRECTION_DIR_NON_SPACING_MARK
IntlChar::CHAR_DIRECTION_BOUNDARY_NETRA
以下是範例-
<?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>"; ?>
# #以下是輸出-
int(3) int(10) NULL int(0)
以上是在PHP中,IntlChar charDirection()函數的作用是傳回給定字元的方向屬性的詳細內容。更多資訊請關注PHP中文網其他相關文章!