authorgravatar for r00ster91@proton.meWooster <r00ster91@proton.me> 2022-10-23 18:57:39+02:00
committergravatar for r00ster91@proton.meWooster <r00ster91@proton.me> 2022-10-24 18:06:40+02:00
loga0a50955f080bd5576ef43cd8b56466d0d4cbd20
tree2b528b692d13bdf59bff74b467fc783df411172b
parent4f04759c874d5fd41c7cadeb974b4459559bc2a7

docs(std.fs.path.extension): correct arrow alignment


1 files changed, 8 insertions(+), 8 deletions(-)

lib/std/fs/path.zig+8-8
...@@ -1257,14 +1257,14 @@ fn testRelativeWindows(from: []const u8, to: []const u8, expected_output: []cons...@@ -1257,14 +1257,14 @@ fn testRelativeWindows(from: []const u8, to: []const u8, expected_output: []cons
1257/// Files that end with `.`, or that start with `.` and have no other `.` in their name,1257/// Files that end with `.`, or that start with `.` and have no other `.` in their name,
1258/// are considered to have no extension.1258/// are considered to have no extension.
1259/// Examples:1259/// Examples:
1260/// - `"main.zig"` ⇒ `".zig"`1260/// - `"main.zig"` ⇒ `".zig"`
1261/// - `"src/main.zig"` ⇒ `".zig"`1261/// - `"src/main.zig"` ⇒ `".zig"`
1262/// - `".gitignore"` ⇒ `""`1262/// - `".gitignore"` ⇒ `""`
1263/// - `".image.png"` ⇒ `".png"`1263/// - `".image.png"` ⇒ `".png"`
1264/// - `"keep."` ⇒ `"."`1264/// - `"keep."` ⇒ `"."`
1265/// - `"src.keep.me"` ⇒ `".me"`1265/// - `"src.keep.me"` ⇒ `".me"`
1266/// - `"/src/keep.me"` ⇒ `".me"`1266/// - `"/src/keep.me"` ⇒ `".me"`
1267/// - `"/src/keep.me/"` ⇒ `".me"`1267/// - `"/src/keep.me/"` ⇒ `".me"`
1268/// The returned slice is guaranteed to have its pointer within the start and end1268/// The returned slice is guaranteed to have its pointer within the start and end
1269/// pointer address range of `path`, even if it is length zero.1269/// pointer address range of `path`, even if it is length zero.
1270pub fn extension(path: []const u8) []const u8 {1270pub fn extension(path: []const u8) []const u8 {
...@@ -1275,7 +1275,7 @@ pub fn extension(path: []const u8) []const u8 {...@@ -1275,7 +1275,7 @@ pub fn extension(path: []const u8) []const u8 {
1275}1275}
12761276
1277fn testExtension(path: []const u8, expected: []const u8) !void {1277fn testExtension(path: []const u8, expected: []const u8) !void {
1278 try std.testing.expectEqualStrings(expected, extension(path));1278 try testing.expectEqualStrings(expected, extension(path));
1279}1279}
12801280
1281test "extension" {1281test "extension" {