Module trimquotes

Module trimquotes 

Source
Expand description

Quote handling utilities for CLI argument processing. Port of Go’s pkg/trimquotes/trimquotes.go.

Functions§

escape_and_quote 🔒
Escape a string and wrap in double quotes.
replace_quotes
Conditionally wrap a string in double quotes with proper escaping.
trim_quotes
Remove surrounding double quotes from a string. Handles escape sequences within the quoted string.
try_trim_quotes
Convenience wrapper that ignores the success flag. Always returns a string, falling back to the original on failure.
unescape_quoted 🔒
Unescape a double-quoted string (like Go’s strconv.Unquote). The input must start and end with ".