[go: up one dir, main page]

Function symbolize

Source
pub fn symbolize(input: &str) -> String
Expand description

Turn strings into valid symbol identifiers.

Create a new string that has the same content as the input but all unsupported characters replaced by an underscore. Only alphanumeric characters are supported (but the full unicode range).

Additionally, if the string starts with a numeric character, it is prefixed with an underscore.