mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-16 00:21:04 +00:00
11 lines
274 B
Rust
11 lines
274 B
Rust
use heck::CamelCase;
|
|
|
|
/// Remove non alphanumeric characters and CamelCase a string
|
|
pub fn make_actor_id(name: String) -> String {
|
|
name.as_str()
|
|
.to_camel_case()
|
|
.to_string()
|
|
.chars()
|
|
.filter(|c| c.is_alphanumeric())
|
|
.collect()
|
|
}
|