Scala Char toTitleCase() method with example
Last Updated :
11 Nov, 2019
The toTitleCase() method is utilized to convert the stated character to the title case character.
Method Definition: def toTitleCase: Char
Return Type: It returns Char.
Example: 1#
object GfG
{
def main(args : Array[String])
{
val result = 'a' .toTitleCase
println(result)
}
}
|
Example: 2#
object GfG
{
def main(args : Array[String])
{
val result = ( 'h' ).toTitleCase
println(result)
}
}
|
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...