string.len

This function gets the length of a string.

Syntax

string.len(str1)

Arguments

Argument

Type

Description

Str1

string

Source string

Returns

Type

Description

int

The length of the source string, str1

Examples

The function string.len("hello") returns 5.