MCPcopy Create free account
hub / github.com/douglance/devsql / clean_identifier

Function clean_identifier

crates/devsql/src/providers/imports.rs:425–435  ·  view source on GitHub ↗
(text: String)

Source from the content-addressed store, hash-verified

423}
424
425fn clean_identifier(text: String) -> String {
426 let trimmed = text.trim();
427 if (trimmed.starts_with('"') && trimmed.ends_with('"'))
428 || (trimmed.starts_with('\'') && trimmed.ends_with('\''))
429 || (trimmed.starts_with('`') && trimmed.ends_with('`'))
430 {
431 trimmed[1..trimmed.len().saturating_sub(1)].to_string()
432 } else {
433 trimmed.to_string()
434 }
435}
436
437fn node_text(node: Node, source: &str) -> String {
438 let start = node.start_byte();

Callers 3

parse_ts_import_clauseFunction · 0.85
string_literal_valueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected