diff options
Diffstat (limited to 'core/strings')
| -rw-r--r-- | core/strings/strings.odin | 6 |
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[:] |