C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
JavaScript String toLocaleLowerCase() MethodIn an earlier section, we had learnt that a string can be easily converted to lowercase letter using toLowerCase() method. While converting the string to lowercase letter the result may vary due to conflicts between different languages. In Western languages the letter 'i' upper cases to letter 'I' while in Turkish the letter 'i' uppercases to dotted letter '?' . To overcome these problems, we can use toLocaleLowerCase() method. JavaScript string toLocaleLowerCase() method converts the string to lowercase letter on the basis of host's current locale. In most cases, this method returns the similar result as the toLowerCase() method. SyntaxThe toLocaleLowerCase() method is represented by the following syntax: string. toLocaleLowerCase() ReturnsA string of lowercase letter on the basis of host's current locale. JavaScript String toLocaleLowerCase() Method ExampleLet's see some simple examples of toLocaleLowerCase() method. Example 1Here, we will print the given string in lowercase letter. <script> var str="JAVATPOINT"; document.writeln(str.toLocaleLowerCase()); </script> Output: TheDeveloperBlog Example 2Let's see one more example to print the given string in lowercase letter. <script> var str=new String("JAVATPOINT"); document.writeln(str.toLocaleLowerCase()); </script> Output: TheDeveloperBlog
Next TopicJavaScript String
|