We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2ba8d7 commit 69af91cCopy full SHA for 69af91c
+stdlib/absolute.m
@@ -18,8 +18,8 @@
18
19
function c = absolute(p, base, expand_tilde)
20
arguments
21
- p (1,1) string
22
- base (1,1) string = ""
+ p {mustBeTextScalar}
+ base {mustBeTextScalar} = ''
23
expand_tilde (1,1) logical = true
24
end
25
@@ -42,15 +42,19 @@
42
43
44
if ~stdlib.is_absolute(b)
45
- b = strcat(pwd(), "/", b);
+ b = strcat(pwd(), '/', b);
46
47
48
b = stdlib.posix(b);
49
50
if strlength(c) == 0
51
c = b;
52
else
53
- c = strcat(b, "/", c);
+ c = strcat(b, '/', c);
54
+end
55
+
56
+if isstring(p)
57
+ c = string(c);
58
59
60
0 commit comments