The isSpaceChar() method is utilized to check if the stated character is space character or not.
Method Definition: def isSpaceChar: Boolean
Return Type: It returns true if the stated character is space character else it returns false.
Example: 1#
// Scala program of isSpaceChar() // method // Creating object object GfG
{ // Main method
def main(args : Array[String])
{
// Applying isSpaceChar() method
val result = ( '\u2028' ).isSpaceChar
// Displays output
println(result)
}
} |
Output:
true
Example: 2#
// Scala program of isSpaceChar() // method // Creating object object GfG
{ // Main method
def main(args : Array[String])
{
// Applying isSpaceChar() method
val result = ( '*' ).isSpaceChar
// Displays output
println(result)
}
} |
Output:
false