Files
turso/core/util.rs
Piotr Jastrzebski 81cf0430de Improve normalize_ident
Signed-off-by: Piotr Jastrzebski <haaawk@gmail.com>
2024-07-07 13:05:00 +02:00

8 lines
191 B
Rust

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