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