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