missed some renamings

This commit is contained in:
D-Berg 2025-11-30 18:03:39 +01:00
parent a98d2540ae
commit 8404f7f06e
4 changed files with 6 additions and 6 deletions

View file

@ -49,7 +49,7 @@ pub fn fileSourceHtml(
var cursor: usize = ast.tokenStart(start_token);
var indent: usize = 0;
if (std.mem.lastIndexOf(u8, ast.source[0..cursor], "\n")) |newline_index| {
if (std.mem.findLast(u8, ast.source[0..cursor], "\n")) |newline_index| {
for (ast.source[newline_index + 1 .. cursor]) |c| {
if (c == ' ') {
indent += 1;

View file

@ -149,7 +149,7 @@ fn mainImpl() !void {
var stdin_reader = std.fs.File.stdin().reader(&stdin_buffer);
while (stdin_reader.takeDelimiterExclusive('\n')) |line| {
const trimmed = std.mem.trimRight(u8, line, '\r');
const trimmed = std.mem.trimEnd(u8, line, '\r');
try parser.feedLine(trimmed);
} else |err| switch (err) {
error.EndOfStream => {},

View file

@ -1197,7 +1197,7 @@ fn windowsCreateProcessPathExt(
const is_bat_or_cmd = bat_or_cmd: {
const app_name = app_buf.items[0..app_name_len];
const ext_start = std.mem.lastIndexOfScalar(u16, app_name, '.') orelse break :bat_or_cmd false;
const ext_start = std.mem.findScalarLast(u16, app_name, '.') orelse break :bat_or_cmd false;
const ext = app_name[ext_start..];
const ext_enum = windowsCreateProcessSupportsExtension(ext) orelse break :bat_or_cmd false;
switch (ext_enum) {
@ -1225,7 +1225,7 @@ fn windowsCreateProcessPathExt(
// it's treated as an unrecoverable error. Otherwise, it'll be
// skipped as normal.
const app_name = app_buf.items[0..app_name_len];
const ext_start = std.mem.lastIndexOfScalar(u16, app_name, '.') orelse break :unappended err;
const ext_start = std.mem.findScalarLast(u16, app_name, '.') orelse break :unappended err;
const ext = app_name[ext_start..];
if (windows.eqlIgnoreCaseWtf16(ext, unicode.utf8ToUtf16LeStringLiteral(".EXE"))) {
return error.UnrecoverableInvalidExe;

View file

@ -202,8 +202,8 @@ fn fetchTarget(
var it = mem.splitScalar(u8, headers_list_str, '\n');
while (it.next()) |line| {
if (mem.lastIndexOf(u8, line, "clang") != null) continue;
if (mem.lastIndexOf(u8, line, prefix[0..])) |idx| {
if (mem.findLast(u8, line, "clang") != null) continue;
if (mem.findLast(u8, line, prefix[0..])) |idx| {
const out_rel_path = line[idx + prefix.len + 1 ..];
const out_rel_path_stripped = mem.trim(u8, out_rel_path, " \\");
const dirname = fs.path.dirname(out_rel_path_stripped) orelse ".";