gistools/parsers/wkt/
mod.rs

1/// WKT to JSON Conversion
2pub mod object;
3
4use alloc::string::String;
5pub use object::*;
6
7/// Cleans up a string by trimming whitespace, removing surrounding quotes, and normalizing spaces.
8pub fn clean_string(s: &str) -> String {
9    s.trim() // Remove whitespace at the start and end
10        .trim_matches(|c: char| c == '\'' || c == '\"' || c.is_control() || c == '\u{0000}') // Remove single or double quotes from start and end
11        .replace(char::is_whitespace, " ") // Replace multiple spaces with a single space
12}