mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-17 00:11:25 -07:00
fix strings.last_index_any for single char
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user