Scala Char isUnicodeIdentifierPart() 方法与示例
isUnicodeIdentifierPart()方法用于查找所述字符是否是 Unicode 标识符的一部分,而不是第一个字符。例如:数字、字母、组合标记、连接标点符号(如'_')、数字字符(如罗马数字字符)、非空格标记。
Method Definition: def isUnicodeIdentifierPart: Boolean
Return Type: It returns true if the stated character is part of a Unicode identifier else it returns false.
示例:1#
// Scala program of isUnicodeIdentifierPart()
// method
// Creating object
object GfG
{
// Main method
def main(args:Array[String])
{
// Applying isUnicodeIdentifierPart() method
val result = ('7').isUnicodeIdentifierPart
// Displays output
println(result)
}
}
输出:
true
示例:2#
// Scala program of isUnicodeIdentifierPart()
// method
// Creating object
object GfG
{
// Main method
def main(args:Array[String])
{
// Applying isUnicodeIdentifierPart() method
val result = ('_').isUnicodeIdentifierPart
// Displays output
println(result)
}
}
输出:
true