Skip to main content

accept_as_ident

Function accept_as_ident 

Source
pub fn accept_as_ident(ident: &str) -> bool
Expand description

Return true if the string is a valid Rust identifier.

If this function returns false, typify adds a trailing underscore to it. For example, fn becomes fn_.