mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-25 04:14:57 +00:00
Fix typo
This commit is contained in:
@@ -115,7 +115,7 @@ simple_equal :: proc(a, b: $T/[]$E) -> bool where intrinsics.type_is_simple_comp
|
||||
}
|
||||
|
||||
|
||||
has_prefix :: proc(array: $T/[]$E, needle: T) -> bool where intrinsics.type_is_comparable(E) {
|
||||
has_prefix :: proc(array: $T/[]$E, needle: E) -> bool where intrinsics.type_is_comparable(E) {
|
||||
n := len(needle);
|
||||
if len(array) >= n {
|
||||
return equal(array[:n], needle);
|
||||
@@ -124,7 +124,7 @@ has_prefix :: proc(array: $T/[]$E, needle: T) -> bool where intrinsics.type_is_c
|
||||
}
|
||||
|
||||
|
||||
has_suffix :: proc(array: $T/[]$E, needle: T) -> bool where intrinsics.type_is_comparable(E) {
|
||||
has_suffix :: proc(array: $T/[]$E, needle: E) -> bool where intrinsics.type_is_comparable(E) {
|
||||
array := array;
|
||||
m, n := len(array), len(needle);
|
||||
if m >= n {
|
||||
|
||||
Reference in New Issue
Block a user