Scala Char isSpaceChar() method with example
Last Updated :
03 Nov, 2019
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#
object GfG
{
def main(args : Array[String])
{
val result = ( '\u2028' ).isSpaceChar
println(result)
}
}
|
Example: 2#
object GfG
{
def main(args : Array[String])
{
val result = ( '*' ).isSpaceChar
println(result)
}
}
|
Share your thoughts in the comments
Please Login to comment...