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
".