| ... | @@ -1226,7 +1226,7 @@ fn testRelativeWindows(from: []const u8, to: []const u8, expected_output: []cons | ... | @@ -1226,7 +1226,7 @@ fn testRelativeWindows(from: []const u8, to: []const u8, expected_output: []cons |
| 1226 | /// pointer address range of `path`, even if it is length zero. | 1226 | /// pointer address range of `path`, even if it is length zero. |
| 1227 | pub fn extension(path: []const u8) []const u8 { | 1227 | pub fn extension(path: []const u8) []const u8 { |
| 1228 | const filename = basename(path); | 1228 | const filename = basename(path); |
| 1229 | const index = mem.lastIndexOf(u8, filename, ".") orelse return path[path.len..]; | 1229 | const index = mem.lastIndexOfScalar(u8, filename, '.') orelse return path[path.len..]; |
| 1230 | if (index == 0) return path[path.len..]; | 1230 | if (index == 0) return path[path.len..]; |
| 1231 | return filename[index..]; | 1231 | return filename[index..]; |
| 1232 | } | 1232 | } |