Skip to content

Commit 71fbe7b

Browse files
committed
join: don't coerce input
1 parent 502429c commit 71fbe7b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

+stdlib/join.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22

33
function p = join(base, other)
44
arguments
5-
base (1,1) string
6-
other (1,1) string
5+
base {mustBeTextScalar}
6+
other {mustBeTextScalar}
77
end
88

99

1010
b = stdlib.posix(base);
1111
o = stdlib.posix(other);
1212

13-
if startsWith(o, "/") || (ispc && stdlib.is_absolute(o))
13+
if startsWith(o, '/') || (ispc && stdlib.is_absolute(o))
1414
p = o;
1515
return
1616
end
1717

1818
p = b;
1919
if strlength(o)
20-
if endsWith(p, "/")
20+
if endsWith(p, '/')
2121
p = strcat(p, o);
2222
elseif strlength(p)
23-
p = strcat(p, "/", o);
23+
p = strcat(p, '/', o);
2424
else
2525
p = o;
2626
end

0 commit comments

Comments
 (0)