Scala Char isTitleCase() method with example
Last Updated :
03 Nov, 2019
The isTitleCase() method is utilized to find if the stated character is a title-case character or not. A character is called title-case character if its general category type which is produced by Character.getType(ch), is a TITLECASE_LETTER.
Method Definition: def isTitleCase: Boolean
Return Type: It returns true if the stated character is Title-Case else it returns false.
Example: 1#
object GfG
{
def main(args : Array[String])
{
val result = '\u01f2' .isTitleCase
println(result)
}
}
|
Example: 2#
object GfG
{
def main(args : Array[String])
{
val result = ( 'T' ).isTitleCase
println(result)
}
}
|
Share your thoughts in the comments
Please Login to comment...