From 0132442c1d7173e4b8d3aa3ced1888ba3c221163 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Mon, 5 Mar 2018 21:45:13 +0100 Subject: [PATCH] strutils.strip: improve the documentation; fixes #7159 --- 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 749a2696d8..0c35c1d52f 100644 --- a/lib/pure/strutils.nim +++ b/lib/pure/strutils.nim @@ -440,10 +440,12 @@ proc cmpIgnoreStyle*(a, b: string): int {.noSideEffect, proc strip*(s: string, leading = true, trailing = true, chars: set[char] = Whitespace): string {.noSideEffect, rtl, extern: "nsuStrip".} = - ## Strips `chars` from `s` and returns the resulting string. + ## Strips leading or trailing `chars` from `s` and returns + ## the resulting string. ## ## If `leading` is true, leading `chars` are stripped. ## If `trailing` is true, trailing `chars` are stripped. + ## If both are false, the string is returned unchanged. var first = 0 last = len(s)-1