stripLineEnd aka chomp (#9623)

This commit is contained in:
Timothee Cour
2018-11-04 23:01:31 -08:00
committed by Andreas Rumpf
parent 62693457df
commit e4e19f8288

View File

@@ -2513,6 +2513,7 @@ proc stripLineEnd*(s: var string) =
## Returns ``s`` stripped from one of these suffixes:
## ``\r, \n, \r\n, \f, \v`` (at most once instance).
## For example, can be useful in conjunction with ``osproc.execCmdEx``.
## aka: `chomp`:idx:
runnableExamples:
var s = "foo\n\n"
s.stripLineEnd