mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 09:24:36 +00:00
Clarify behaviour of char replace (#17339)
Clarify behaviour of char replace by adding ```every ocurrence of character```
This commit is contained in:
committed by
GitHub
parent
e332c20ba7
commit
8e8bea9044
@@ -2079,7 +2079,7 @@ func replace*(s, sub: string, by = ""): string {.rtl,
|
||||
|
||||
func replace*(s: string, sub, by: char): string {.rtl,
|
||||
extern: "nsuReplaceChar".} =
|
||||
## Replaces `sub` in `s` by the character `by`.
|
||||
## Replaces every occurence of character `sub` in `s` by the character `by`.
|
||||
##
|
||||
## Optimized version of `replace <#replace,string,string,string>`_ for
|
||||
## characters.
|
||||
|
||||
Reference in New Issue
Block a user