locutus
Version:
Locutus other languages' standard libraries to JavaScript for fun and educational purposes
11 lines (10 loc) • 378 B
JavaScript
export function tolower(s) {
// discuss at: https://locutus.io/awk/tolower/
// parity verified: GNU AWK 5.3
// original by: Kevin van Zonneveld (https://kvz.io)
// example 1: tolower('HELLO')
// returns 1: 'hello'
// example 2: tolower('Hello World')
// returns 2: 'hello world'
return String(s).toLowerCase();
}