Scala Char isUnicodeIdentifierStart() 方法示例
isUnicodeIdentifierStart()方法用于查找所述字符是否允许作为 Unicode 标识符中的第一个字符。
当且仅当以下条件之一为真时,字符才开始 Unicode 标识符:
Method Definition: def isUnicodeIdentifierStart: Boolean
Return Type: It returns true if the stated character is permissible as the first character in a Unicode identifier else it returns false.
示例:1#
// Scala program of isUnicodeIdentifierStart()
// method
// Creating object
object GfG
{
// Main method
def main(args:Array[String])
{
// Applying isUnicodeIdentifierStart() method
val result = ('b').isUnicodeIdentifierStart
// Displays output
println(result)
}
}
输出:
true
示例:2#
// Scala program of isUnicodeIdentifierStart()
// method
// Creating object
object GfG
{
// Main method
def main(args:Array[String])
{
// Applying isUnicodeIdentifierStart() method
val result = ('_').isUnicodeIdentifierStart
// Displays output
println(result)
}
}
输出:
false