mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +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);
|
n := len(needle);
|
||||||
if len(array) >= n {
|
if len(array) >= n {
|
||||||
return equal(array[:n], needle);
|
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;
|
array := array;
|
||||||
m, n := len(array), len(needle);
|
m, n := len(array), len(needle);
|
||||||
if m >= n {
|
if m >= n {
|
||||||
|
|||||||
Reference in New Issue
Block a user