Open In App

Scala Char isUnicodeIdentifierPart() method with example

Last Updated : 03 Nov, 2019
Improve
Improve
Like Article
Like
Save
Share
Report

The isUnicodeIdentifierPart() method is utilized to find if the stated character is a part of a Unicode identifier as other than the first character or not. For example: a digit, a letter, a combining mark, a connecting punctuation character (such as ‘_’), a numeric letter (such as a Roman numeral character), and a non-spacing mark.

Method Definition: def isUnicodeIdentifierPart: Boolean

Return Type: It returns true if the stated character is part of a Unicode identifier else it returns false.

Example: 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)
          
    }


Output:

true

Example: 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)
          
    }


Output:

true


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads