Generate an API name from a string. Matches what the UI does.
name to be converted into a valid api name
a valid api name
Generate an API name from a string. Matches what the UI does.