带有示例的 Scala Char isIdentifierIgnorable() 方法
isIdentifierIgnorable()方法用于确定所述字符是 Scala 标识符还是 Unicode 标识符中的可忽略字符。
Method Definition: def isIdentifierIgnorable: Boolean
Return Type: It returns true if the stated character is an ignorable control character else it returns false.
示例:1#
// Scala program of isIdentifierIgnorable()
// method
// Creating object
object GfG
{
// Main method
def main(args:Array[String])
{
// Applying isIdentifierIgnorable() method
val result = ('\u0555').isIdentifierIgnorable
// Displays output
println(result)
}
}
输出:
false
示例:2#
// Scala program of isIdentifierIgnorable()
// method
// Creating object
object GfG
{
// Main method
def main(args:Array[String])
{
// Applying isIdentifierIgnorable() method
val result = ('\u000E').isIdentifierIgnorable
// Displays output
println(result)
}
}
输出:
true