diff options
author | Michał Zieliński <michal@zielinscy.org.pl> | 2013-12-10 23:00:01 +0100 |
---|---|---|
committer | Michał Zieliński <michal@zielinscy.org.pl> | 2013-12-10 23:00:01 +0100 |
commit | c36319727558f92a47f7aa5fed1d696d63b48d65 (patch) | |
tree | 205da315eeb57c2f3683c105398581660caf3418 /lib/pure | |
parent | b8072bd22ec6e3ccf1a6be1b19fae9de3a0fdcc9 (diff) | |
download | Nim-c36319727558f92a47f7aa5fed1d696d63b48d65.tar.gz |
Deprecate quoteIfContainsWhite in favor of osproc.quoteShell.
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/strutils.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim index a4aa81578..fe71cb77b 100644 --- a/lib/pure/strutils.nim +++ b/lib/pure/strutils.nim @@ -709,9 +709,11 @@ proc rfind*(s, sub: string, start: int = -1): int {.noSideEffect.} = if result != -1: return return -1 -proc quoteIfContainsWhite*(s: string): string = +proc quoteIfContainsWhite*(s: string): string {.deprecated.} = ## returns ``'"' & s & '"'`` if `s` contains a space and does not ## start with a quote, else returns `s` + ## DEPRECATED as it was confused for shell quoting function. + ## For this application use osproc.quoteShell. if find(s, {' ', '\t'}) >= 0 and s[0] != '"': result = '"' & s & '"' else: |