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#
// Scala program of isTitleCase() // method // Creating object object GfG
{ // Main method
def main(args : Array[String])
{
// Applying isTitleCase() method
val result = '\u01f2' .isTitleCase
// Displays output
println(result)
}
} |
Output:
true
Example: 2#
// Scala program of isTitleCase() // method // Creating object object GfG
{ // Main method
def main(args : Array[String])
{
// Applying isTitleCase() method
val result = ( 'T' ).isTitleCase
// Displays output
println(result)
}
} |
Output:
false