Skip to content

Commit 26ecc8b

Browse files
authored
fix Path.ri
1 parent b7b5887 commit 26ecc8b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/std/src/fs/Path.ri

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ public struct Path {
114114
return path[start_index + 1 .. end_index];
115115
}
116116

117-
public func file_name(path: string) -> ? string {
118-
return path.all_before_last(Self.separatorStr);
117+
public func file_name(path: string) -> string {
118+
return path.all_before_last_of(Self.separatorStr);
119119
}
120120

121121
/// Returns the extension of the file name (if any).

0 commit comments

Comments
 (0)