JavaScript: String.prototype.toLowerCase
toUpperCase
str.toUpperCase()
-
Return a string of upper case version of string str.
works on Greek or any unicode that has upper/lower case defined.
console.log( "abc".toUpperCase() === "ABC" ); console.log( "δγπ".toUpperCase() === "ΔΓΠ" );
toLowerCase
str.toLowerCase()
-
Return a string of lower case version of string str.
console.log( "ABC".toLowerCase() === "abc" ); console.log( "ΔΓΠ".toLowerCase() === "δγπ" );
toLocaleUpperCase, toLocaleLowerCase
str.toLocaleUpperCase()
-
same as
str.toUpperCase()
, except that it may be different in some languages (for example, Turkish). JavaScript implementation may not chose to have this behavior. In that case, its identical tostr.toUpperCase()
.