MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / parse_trim_mode

Method parse_trim_mode

graphlite/src/functions/string_functions.rs:160–167  ·  view source on GitHub ↗

Parse trim mode from a string value

(s: &str)

Source from the content-addressed store, hash-verified

158
159 /// Parse trim mode from a string value
160 fn parse_trim_mode(s: &str) -> Option<TrimMode> {
161 match s.to_uppercase().as_str() {
162 "LEADING" => Some(TrimMode::Leading),
163 "TRAILING" => Some(TrimMode::Trailing),
164 "BOTH" => Some(TrimMode::Both),
165 _ => None,
166 }
167 }
168
169 /// Perform the actual trimming based on mode
170 fn trim_string(input: &str, trim_chars: &str, mode: TrimMode) -> String {

Callers

nothing calls this directly

Calls 1

as_strMethod · 0.45

Tested by

no test coverage detected