📜  带有示例的 Scala Char isIdentifierIgnorable() 方法

📅  最后修改于: 2022-05-13 01:55:50.286000             🧑  作者: Mango

带有示例的 Scala Char isIdentifierIgnorable() 方法

isIdentifierIgnorable()方法用于确定所述字符是 Scala 标识符还是 Unicode 标识符中的可忽略字符。

示例: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