带有示例的 Scala Char isLower() 方法
isLower()方法用于检查指定的字符值是否为小写。
Method Definition: def isLower: Boolean
Return Type: It returns true if the stated character is in lowercase else it returns false.
示例:1#
// Scala program of isLower()
// method
// Creating object
object GfG
{
// Main method
def main(args:Array[String])
{
// Applying isLower() method
val result = ('c').isLower
// Displays output
println(result)
}
}
输出:
true
示例:2#
// Scala program of isLower()
// method
// Creating object
object GfG
{
// Main method
def main(args:Array[String])
{
// Applying isLower() method
val result = ('A').isLower
// Displays output
println(result)
}
}
输出:
false