JavaScript

$u.s.changeCase Function

Syntax

$u.s.changeCase(str as string, type as string)

Arguments

strstring

The string to modify.

typestring

Defines how to modify the case of the string. Types can be:

Description

Change the case of a string.

Example

var str = 'hello world!';
str = $u.s.changeCase(str,'u');
/* result is: 'HELLO WORLD!'*/

str = $u.s.changeCase(str,'l');
/* result is: 'hello world!'*/

str = 'hello WORLD!';
str = $u.s.changeCase(str,'fu');
/* result is: 'Hello WORLD!'*/

str = 'hello WORLD!';
str = $u.s.changeCase(str,'furl');
/* result is: 'Hello world!'*/

str = 'hello WORLD!';
str = $u.s.changeCase(str,'wfu');
/* result is: 'Hello WORLD!'*/

str = $u.s.changeCase(str,'wfurl');
/* result is: 'Hello World!'*/