aboutsummaryrefslogtreecommitdiff
path: root/core/strings
diff options
context:
space:
mode:
authorWes Hardee <weshardee@gmail.com>2021-12-18 12:43:33 -0600
committerWes Hardee <weshardee@gmail.com>2021-12-18 12:43:33 -0600
commit92ce7defb12436b81eb1f2c19fa1e01be4a8ead3 (patch)
tree75a9b9c9ad10d7a2b39b05afba2fd88a7a185f0f /core/strings
parenta48317deee95b956430ace83f0db3e34bef590dd (diff)
parent0548db423067bce16d45af651819bf56feb5d411 (diff)
Merge branch 'master' of https://github.com/weshardee/Odin
Diffstat (limited to 'core/strings')
-rw-r--r--core/strings/strings.odin6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/strings/strings.odin b/core/strings/strings.odin
index a8199e0cf..3f703372f 100644
--- a/core/strings/strings.odin
+++ b/core/strings/strings.odin
@@ -504,8 +504,8 @@ index_any :: proc(s, chars: string) -> int {
}
}
- for c in chars {
- if i := index_rune(s, c); i >= 0 {
+ for c, i in s {
+ if index_rune(chars, c) >= 0 {
return i
}
}
@@ -1288,7 +1288,7 @@ fields_proc :: proc(s: string, f: proc(rune) -> bool, allocator := context.alloc
}
if start >= 0 {
- append(&substrings, s[start : end])
+ append(&substrings, s[start : len(s)])
}
return substrings[:]