summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/strutils.nim7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim
index 510f0682d..4098749ce 100644
--- a/lib/pure/strutils.nim
+++ b/lib/pure/strutils.nim
@@ -2037,7 +2037,7 @@ func contains*(s: string, chars: set[char]): bool =
 
 func replace*(s, sub: string, by = ""): string {.rtl,
     extern: "nsuReplaceStr".} =
-  ## Replaces every occurence of `sub` in `s` by the string `by`.
+  ## Replaces every occurrence of the string `sub` in `s` with the string `by`.
   ##
   ## See also:
   ## * `find func<#find,string,string,Natural,int>`_
@@ -2079,7 +2079,8 @@ func replace*(s, sub: string, by = ""): string {.rtl,
 
 func replace*(s: string, sub, by: char): string {.rtl,
     extern: "nsuReplaceChar".} =
-  ## Replaces every occurence of character `sub` in `s` by the character `by`.
+  ## Replaces every occurrence of the character `sub` in `s` with the character
+  ## `by`.
   ##
   ## Optimized version of `replace <#replace,string,string,string>`_ for
   ## characters.
@@ -2097,7 +2098,7 @@ func replace*(s: string, sub, by: char): string {.rtl,
 
 func replaceWord*(s, sub: string, by = ""): string {.rtl,
     extern: "nsuReplaceWord".} =
-  ## Replaces `sub` in `s` by the string `by`.
+  ## Replaces every occurrence of the string `sub` in `s` with the string `by`.
   ##
   ## Each occurrence of `sub` has to be surrounded by word boundaries
   ## (comparable to `\b` in regular expressions), otherwise it is not