diff options
| author | gingerBill <bill@gingerbill.org> | 2024-01-09 11:01:24 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-01-09 11:01:24 +0000 |
| commit | 72dfb73c9d375e2ee280398e40cdcc2d3415ee24 (patch) | |
| tree | 1a0f772b7ae76132b8fc3167dcd9ed8b2c327110 /core/strings | |
| parent | 67dcd916e8f7b1badef5c6beee621557b069db3c (diff) | |
| parent | efb2b050400e7e566d7f4a1e3695c09d75059945 (diff) | |
Merge branch 'master' of https://github.com/odin-lang/Odin
Diffstat (limited to 'core/strings')
| -rw-r--r-- | core/strings/strings.odin | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/strings/strings.odin b/core/strings/strings.odin index 539829a1a..5cee25a66 100644 --- a/core/strings/strings.odin +++ b/core/strings/strings.odin @@ -1792,7 +1792,8 @@ last_index_any :: proc(s, chars: string) -> (res: int) { if r >= utf8.RUNE_SELF { r = utf8.RUNE_ERROR } - return index_rune(chars, r) + i := index_rune(chars, r) + return i if i < 0 else 0 } if len(s) > 8 { |