Skip to main content

sanitize_identifier

Function sanitize_identifier 

Source
pub fn sanitize_identifier(name: &str) -> Result<String, JavaGenError>
Expand description

Sanitizes an IDL identifier for Java.

If the name is reserved, a _ suffix is appended (classclass_). Otherwise it stays unchanged.

§Errors

Returns JavaGenError::InvalidName if the name is empty.