PHP | IntlChar foldCase() Function
The IntlChar::foldCase() function is an inbuilt function in PHP which is used to perform case folding on a code point. Case folding means the given character is mapped to its equivalent lowercase characters.
mixed IntlChar::foldCase( $codepoint, $options = IntlChar::FOLD_CASE_DEFAULT )
Parameters: This function accepts two parameters as mentioned above and described below:
- $codepoint: This parameter is a character or integer value, which is encoded as a UTF-8 string.
- $options: This parameter holds the character constants IntlChar::FOLD_CASE_DEFAULT by default or IntlChar::FOLD_CASE_EXCLUDE_SPECIAL_I.
Return Value: This function returns Simple_Case_Folding of the codepoint. If the codepoint has no case folding equivalent, then the codepoint itself is returned.
Below program illustrates the IntlChar::foldCase() function in PHP:
NULL string(1) "@" string(1) "&" string(1) "c" NULL string(1) "/" string(1) "g" string(1) "1"