Skip to content

Commit ffd6cda

Browse files
committed
base: add path_join
1 parent 540a735 commit ffd6cda

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

base/sources/ts/path.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,3 +184,12 @@ function path_is_protected(): bool {
184184
return false;
185185
/// end
186186
}
187+
188+
function path_join(a: string, b: string): string {
189+
let path: string = a;
190+
if (!ends_with(path, path_sep)) {
191+
path += path_sep;
192+
}
193+
path += b;
194+
return path;
195+
}

0 commit comments

Comments
 (0)