mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-03 05:08:14 +00:00
[path/filepath] Change join() to take a []string instead of varargs
This makes passing an allocator easier, as you no longer have to resort to
named arguments:
Before:
`join(a, b, c)` became `join(elems={a, b, c}, allocator=ally)`
After:
`join({a, b, c})` becomes `join({a, b, c}, ally)`
This commit is contained in:
@@ -88,7 +88,7 @@ abs :: proc(path: string, allocator := context.allocator) -> (string, bool) {
|
||||
}
|
||||
|
||||
|
||||
join :: proc(elems: ..string, allocator := context.allocator) -> string {
|
||||
join :: proc(elems: []string, allocator := context.allocator) -> string {
|
||||
for e, i in elems {
|
||||
if e != "" {
|
||||
return join_non_empty(elems[i:], allocator)
|
||||
|
||||
Reference in New Issue
Block a user