used the wrong str
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Tue, 26 Oct 2021 13:09:47 +0000 (08:09 -0500)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Tue, 26 Oct 2021 13:09:47 +0000 (08:09 -0500)
core/string.onyx

index 9b6da85d47c1cf30b9eb9bc6efe9cd348a6d86e4..6159eb2bb475eef09bd7e8e680ef661bd210fb3b 100644 (file)
@@ -262,7 +262,7 @@ advance :: #match {
 }
 
 replace :: (s: str, to_replace: u8, replace_with: u8) {
-    for ^c: str {
+    for ^c: s {
         if *c == to_replace do *c = replace_with;
     }
 }