toSnakeCase


Description:

public static string toSnakeCase (string? s)

Convert the string to snake_case. Splits on whitespace, hyphens, and camelCase boundaries.

Example:

    assert (Strings.toSnakeCase ("helloWorld") == "hello_world");
assert (Strings.toSnakeCase ("Hello World") == "hello_world");

Parameters:

s

the string.

Returns:

snake_case string.