--- warning: This file is auto generated by `yarn web:inject`, do not edit by hand examples: - lower('HELLO') - lower('Hello World') returns: - '''hello''' - '''hello world''' dependencies: [] authors: original by: - Kevin van Zonneveld (https://kvz.io) notes: [] parityVerified: - Lua 5.4 isTypescript: true type: function layout: function title: Lua's string.lower in TypeScript description: >- Here's what our current TypeScript equivalent to Lua's string.lower looks like. function: lower category: string language: lua permalink: lua/string/lower/ alias: - /functions/lua/lower/ - /functions/string/lower/ - /lua/lower/ ---
{% codeblock lang:typescript %}export function lower(s: string): string { // discuss at: https://locutus.io/lua/lower/ // parity verified: Lua 5.4 // original by: Kevin van Zonneveld (https://kvz.io) // example 1: lower('HELLO') // returns 1: 'hello' // example 2: lower('Hello World') // returns 2: 'hello world' return String(s).toLowerCase() } {% endcodeblock %}