From c36319727558f92a47f7aa5fed1d696d63b48d65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zieli=C5=84ski?= Date: Tue, 10 Dec 2013 23:00:01 +0100 Subject: [PATCH] Deprecate quoteIfContainsWhite in favor of osproc.quoteShell. --- lib/pure/strutils.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim index a4aa815787..fe71cb77b3 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: