Files
turso/core/util.rs
Piotr Jastrzebski 83c7e7bd95 Remove unneeded allocation
Signed-off-by: Piotr Jastrzebski <haaawk@gmail.com>
2024-07-07 12:45:49 +02:00

8 lines
203 B
Rust

pub fn normalize_ident(ident: &str) -> String {
if ident.starts_with('"') && ident.ends_with('"') {
ident[1..ident.len() - 1].to_lowercase()
} else {
ident.to_lowercase()
}
}