diff options
| author | gingerBill <bill@gingerbill.org> | 2020-03-05 20:34:30 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-03-05 20:34:30 +0000 |
| commit | e92fdb4a99bf9d27009dd35fdd074ff14facfc03 (patch) | |
| tree | e74c13d12da216f2548db0a8359e491263dc6acd /core/strings/strings.odin | |
| parent | 2fe0eaf2adf952867d4ce4fba53b4b3ac75e1ba5 (diff) | |
`x if cond else y` and `x when cond else y` expressions
Diffstat (limited to 'core/strings/strings.odin')
| -rw-r--r-- | core/strings/strings.odin | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/strings/strings.odin b/core/strings/strings.odin index a477b9e13..fd3808684 100644 --- a/core/strings/strings.odin +++ b/core/strings/strings.odin @@ -325,7 +325,7 @@ last_index :: proc(s, substr: string) -> int { case n == 1: return last_index_byte(s, substr[0]); case n == len(s): - return substr == s ? 0 : -1; + return 0 if substr == s else -1; case n > len(s): return -1; } |