toLowerCase
优质
小牛编辑
135浏览
2023-12-01
Converts all of the characters in this string to lowercase.
Signature
StringLikeSequence.toLowerCase = function() { /*...*/ }
StringLikeSequence.toLowerCase = function toLowerCase() { return this.mapString(function(char) { return char.toLowerCase(); }); }
Name | Type(s) | Description |
---|---|---|
returns | StringLikeSequence | A new sequence with the same characters as this sequence, all lowercase. |
Examples
function nextLetter(a) { return String.fromCharCode(a.charCodeAt(0) + 1); } Lazy('FOO').toLowerCase() // sequence: 'foo' Lazy('FOO').substring(1).toLowerCase() // sequence: 'oo' Lazy('ABC').mapString(nextLetter).toLowerCase() // sequence: 'bcd'