const std = @import("std");
pub fn main() void {
const haystack = "hello world";
// indexOf returns ?usize: the start offset, or null
if (std.mem.indexOf(u8, haystack, "world")) |at| {
std.debug.print("found at {d}\n", .{at});
} else {
std.debug.print("not found\n", .{});
}
}std.mem.indexOf returns an optional index