mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 21:40:32 +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,
|
func replace*(s: string, sub, by: char): string {.rtl,
|
||||||
extern: "nsuReplaceChar".} =
|
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
|
## Optimized version of `replace <#replace,string,string,string>`_ for
|
||||||
## characters.
|
## characters.
|
||||||
|
|||||||
Reference in New Issue
Block a user