apps-script-utils 2.1.1 Help

toLowerCase

function toLowerCase(value: string, options: ToLowerCaseOptions = {}): string;

The difference from String#toLowerCase is the validation and the optional trim: an empty or non-string input throws instead of producing something surprising further down.

Parameters

Parameter

Type

Description

value

string

The string to convert. It must not be empty.

options (optional) = {}

ToLowerCaseOptions

trim trims the string and collapses runs of whitespace into single spaces.

Returns

string — the lowered string.

Throws

Exception

Condition

EmptyStringException

the value is not a string, or is empty.

Examples

Converting

toLowerCase(" Hello World ", { trim: true }); // => "hello world"

See also

Source

src/lang/string/toLowerCase.ts

23 September 2026

This documentation was generated with AI (Claude) from the library's source code.