IntlChar::isJavaSpaceChar() function in PHP

The IntlChar::isJavaSpaceChar() function is used to check whether the entered value is a space character or not according to Java conventions.

Syntax

IntlChar::isJavaSpaceChar(val)

Parameters

  • val − A character value encoded as a UTF-8 string.

Return

The IntlChar::isJavaSpaceChar()function returns TRUE of val is a space character according to Java conventions.

Example

The following is an example −

";
   var_dump(IntlChar::isJavaSpaceChar("!"));
   echo "
";    var_dump(IntlChar::isJavaSpaceChar(" "));    echo "
";    var_dump(IntlChar::isJavaSpaceChar("K"));    echo "
";    var_dump(IntlChar::isJavaSpaceChar("Kite!"));    echo "
"; ?>

Output

The following is the output −

NULL
bool(false)
bool(true)
bool(false)
NULL
Updated on: 2019-12-30T08:07:14+05:30

78 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements