snakeCase

Modified on Wed, 02 Aug 2023

Description

Convert string to snake case

Syntax

snakeCase(text)

Parameters

Input ParameterTypeDescription
textstringThe string to convert.

Return value

Type
string

Sample

ExampleResultDescription
snakeCase('John Paul')'john_paul'Convert input text to snake case
snakeCase('--JOHN-PAUL--')'john_paul'Convert input text to snake case

To view all the String functions, click here.

See Also