Skip to content

Commit d681e7b

Browse files
committed
matlab only for now
1 parent d1d412c commit d681e7b

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

+stdlib/is_url.m

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,8 @@
66
s {mustBeTextScalar}
77
end
88

9-
try
10-
y = startsWith(s, alphanumericsPattern + "://");
11-
catch e
12-
% Matlab < R2020b
13-
if ~strcmp(e.identifier, "MATLAB:UndefinedFunction") && ...
14-
~strcmp(e.identifier, "Octave:undefined-function")
15-
rethrow(e)
16-
end
17-
18-
% https://www.mathworks.com/help/matlab/import_export/work-with-remote-data.html
19-
20-
y = startsWith(s, "http://") || startsWith(s, "https://") || ...
21-
startsWith(s, "ftp://") || startsWith(s, "file://") || ...
22-
startsWith(s, "s3://") || startsWith(s, "hdfs://") || ...
23-
startsWith(s, "wasbs://");
24-
end
9+
y = startsWith(s, alphanumericsPattern + "://");
2510

2611
end
2712

28-
%!assert (is_url("http://example.com"), true)
29-
%!assert (is_url("//server"), false)
13+
%!testif 0

0 commit comments

Comments
 (0)