stripLineEnd aka chomp (#9623)
This commit is contained in:
parent
62693457df
commit
e4e19f8288
1 changed files with 1 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue