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 e056a12 commit 4de8594Copy full SHA for 4de8594
+stdlib/filename.m
@@ -8,7 +8,7 @@
8
function f = filename(p, method)
9
arguments
10
p string
11
- method {mustBeMember(method, {'pattern', 'regexp'})} = 'pattern'
+ method = 'pattern'
12
end
13
14
% the pattern method is a few percent faster than regexp
@@ -18,6 +18,7 @@
18
case 'regexp'
19
f = regexp(p, ['[^/\' filesep ']*$'], 'match', 'once');
20
f(ismissing(f)) = "";
21
+ otherwise, error('must be method "pattern" or "regexp"')
22
23
24
0 commit comments