| ... | @@ -378,17 +378,11 @@ test endsWithIgnoreCase { | ... | @@ -378,17 +378,11 @@ test endsWithIgnoreCase { |
| 378 | try std.testing.expect(!endsWithIgnoreCase("BoB", "Bo")); | 378 | try std.testing.expect(!endsWithIgnoreCase("BoB", "Bo")); |
| 379 | } | 379 | } |
| 380 | | 380 | |
| 381 | /// Deprecated in favor of `findIgnoreCase`. | | |
| 382 | pub const indexOfIgnoreCase = findIgnoreCase; | | |
| 383 | | | |
| 384 | /// Finds `needle` in `haystack`, ignoring case, starting at index 0. | 381 | /// Finds `needle` in `haystack`, ignoring case, starting at index 0. |
| 385 | pub fn findIgnoreCase(haystack: []const u8, needle: []const u8) ?usize { | 382 | pub fn findIgnoreCase(haystack: []const u8, needle: []const u8) ?usize { |
| 386 | return findIgnoreCasePos(haystack, 0, needle); | 383 | return findIgnoreCasePos(haystack, 0, needle); |
| 387 | } | 384 | } |
| 388 | | 385 | |
| 389 | /// Deprecated in favor of `findIgnoreCasePos`. | | |
| 390 | pub const indexOfIgnoreCasePos = findIgnoreCasePos; | | |
| 391 | | | |
| 392 | /// Finds `needle` in `haystack`, ignoring case, starting at `start_index`. | 386 | /// Finds `needle` in `haystack`, ignoring case, starting at `start_index`. |
| 393 | /// Uses Boyer-Moore-Horspool algorithm on large inputs; `findIgnoreCasePosLinear` on small inputs. | 387 | /// Uses Boyer-Moore-Horspool algorithm on large inputs; `findIgnoreCasePosLinear` on small inputs. |
| 394 | pub fn findIgnoreCasePos(haystack: []const u8, start_index: usize, needle: []const u8) ?usize { | 388 | pub fn findIgnoreCasePos(haystack: []const u8, start_index: usize, needle: []const u8) ?usize { |
| ... | @@ -410,9 +404,6 @@ pub fn findIgnoreCasePos(haystack: []const u8, start_index: usize, needle: []con | ... | @@ -410,9 +404,6 @@ pub fn findIgnoreCasePos(haystack: []const u8, start_index: usize, needle: []con |
| 410 | return null; | 404 | return null; |
| 411 | } | 405 | } |
| 412 | | 406 | |
| 413 | /// Deprecated in favor of `findIgnoreCaseLinear`. | | |
| 414 | pub const indexOfIgnoreCasePosLinear = findIgnoreCasePosLinear; | | |
| 415 | | | |
| 416 | /// Consider using `findIgnoreCasePos` instead of this, which will automatically use a | 407 | /// Consider using `findIgnoreCasePos` instead of this, which will automatically use a |
| 417 | /// more sophisticated algorithm on larger inputs. | 408 | /// more sophisticated algorithm on larger inputs. |
| 418 | pub fn findIgnoreCasePosLinear(haystack: []const u8, start_index: usize, needle: []const u8) ?usize { | 409 | pub fn findIgnoreCasePosLinear(haystack: []const u8, start_index: usize, needle: []const u8) ?usize { |