summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lib/pure/strutils.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim
index 70f241675..356604f42 100644
--- a/lib/pure/strutils.nim
+++ b/lib/pure/strutils.nim
@@ -336,6 +336,8 @@ proc strip*(s: string, leading = true, trailing = true,
   ## 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.
+  runnableExamples:
+    doAssert " vhellov ".strip().strip(trailing = false, chars = {'v'}) == "hellov"
   var
     first = 0
     last = len(s)-1