Clarify behaviour of char replace (#17339)

Clarify behaviour of char replace by adding ```every ocurrence of character```
This commit is contained in:
Héctor M. Monacci 2021-03-19 15:19:41 -03:00 • committed by GitHub
commit 8e8bea9044
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.