Open In App

Scala Char isUnicodeIdentifierStart() method with example

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

The isUnicodeIdentifierStart() method is utilized to find if the stated character is permissible as the first character in a Unicode identifier.
A character starts a Unicode identifier if and only if one of the below conditions is true:

  • isLetter(ch) returns true,
  • getType(ch) returns LETTER_NUMBER.
  • 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.

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

    
    

    Output:

    true
    

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

    
    

    Output:

    false
    


    Like Article
    Suggest improvement
    Share your thoughts in the comments

    Similar Reads