aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build/Step/CheckObject.zig
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2025-12-22 12:50:46 +0100
committerAlex Rønne Petersen <alex@alexrp.com>2025-12-22 12:50:46 +0100
commitaa0249d74e573742db3567f589fc6e4a00e1fff8 (patch)
treecce61cb7f02072d205a12ae451922f0bf09c13ce /lib/std/Build/Step/CheckObject.zig
parent6b9125cbe662d530160e0732c856aa0da86894c0 (diff)
parent02c5f05e2f0e8e786f0530014e35c1520efd0084 (diff)
downloadzig-aa0249d74e573742db3567f589fc6e4a00e1fff8.tar.gz
zig-aa0249d74e573742db3567f589fc6e4a00e1fff8.zip
Merge pull request 'std.ascii: rename indexOf functions to find' (#30101) from adria/zig:indexof-find into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30101 Reviewed-by: Andrew Kelley <andrewrk@noreply.codeberg.org> Reviewed-by: mlugg <mlugg@noreply.codeberg.org>
Diffstat (limited to 'lib/std/Build/Step/CheckObject.zig')
-rw-r--r--lib/std/Build/Step/CheckObject.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/Build/Step/CheckObject.zig b/lib/std/Build/Step/CheckObject.zig
index 4d5071d2c7..c6c11ce2b9 100644
--- a/lib/std/Build/Step/CheckObject.zig
+++ b/lib/std/Build/Step/CheckObject.zig
@@ -88,7 +88,7 @@ const Action = struct {
while (needle_it.next()) |needle_tok| {
const hay_tok = hay_it.next() orelse break;
if (mem.startsWith(u8, needle_tok, "{")) {
- const closing_brace = mem.indexOf(u8, needle_tok, "}") orelse return error.MissingClosingBrace;
+ const closing_brace = mem.find(u8, needle_tok, "}") orelse return error.MissingClosingBrace;
if (closing_brace != needle_tok.len - 1) return error.ClosingBraceNotLast;
const name = needle_tok[1..closing_brace];
@@ -133,7 +133,7 @@ const Action = struct {
assert(act.tag == .contains);
const hay = mem.trim(u8, haystack, " ");
const phrase = mem.trim(u8, act.phrase.resolve(b, step), " ");
- return mem.indexOf(u8, hay, phrase) != null;
+ return mem.find(u8, hay, phrase) != null;
}
/// Returns true if the `phrase` does not exist within the haystack.
@@ -1662,7 +1662,7 @@ const MachODumper = struct {
.dump_section => {
const name = mem.sliceTo(@as([*:0]const u8, @ptrCast(check.data.items.ptr + check.payload.dump_section)), 0);
- const sep_index = mem.indexOfScalar(u8, name, ',') orelse
+ const sep_index = mem.findScalar(u8, name, ',') orelse
return step.fail("invalid section name: {s}", .{name});
const segname = name[0..sep_index];
const sectname = name[sep_index + 1 ..];