Skip to content

Commit ed2e21b

Browse files
committed
strcat => append
append is recommended for consistency
1 parent 38e17d3 commit ed2e21b

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

+stdlib/+sys/device.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
% Get-CimInstance works, but is 100x slower
1818
% c0 = 'pwsh -c "(Get-CimInstance -ClassName Win32_Volume -Filter \"DriveLetter = ''';
1919
% c2 = '''\").SerialNumber"';
20-
% cmd = strcat(c0, rn, c2);
20+
% cmd = append(c0, rn, c2);
2121

2222
cmd = sprintf('vol "%s"', rn);
2323
elseif ismac()

+stdlib/filename.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
function f = filename(p, backend)
99
arguments
10-
p (1,1) string
10+
p
1111
backend = 'fileparts'
1212
end
1313

+stdlib/root.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
function r = root(p)
55

6-
r = strcat(stdlib.root_name(p), stdlib.root_dir(p));
6+
r = append(stdlib.root_name(p), stdlib.root_dir(p));
77

88
end

example/+javafun/parent.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
if ispc()
1010
rn = stdlib.root_name(pth);
1111
if strlength(pth) && strlength(rn) && startsWith(pth, rn)
12-
par = strcat(rn, filesep);
12+
par = append(rn, filesep);
1313
end
1414
end
1515
else

private/get_compiler.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
end
4343
else
4444
if startsWith(co.ShortName, "INTEL" | "MSVC")
45-
shell = join([strcat('"',string(co.Details.CommandLineShell),'"'), ...
45+
shell = join([append('"',string(co.Details.CommandLineShell),'"'), ...
4646
co.Details.CommandLineShellArg], " ");
4747
elseif startsWith(co.ShortName, "mingw64")
4848
shell = "set PATH=" + fileparts(comp) + pathsep + "%PATH%";

private/publish_gen_index_html.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
copyfile(styleFile, outdir)
3838

3939
[~, n, s] = fileparts(styleFile);
40-
styleName = strcat(n, s);
40+
styleName = append(n, s);
4141
[head, body] = index_html(styleName, pkg_name, tagline, git_txt, project_url);
4242

4343
fid = fopen(readme, 'w');
@@ -71,7 +71,7 @@ function publish_pkg(fid, pkg, pkg_name)
7171
% pkg_name = pkg_name + "." + subname(2:end);
7272
% relpath = subname(2:end) + "/";
7373
% outdir = fullfile(outdir, relpath);
74-
% fprintf(fid, strcat('<h3>', pkg_name, '</h3>', newline));
74+
% fprintf(fid, append('<h3>', pkg_name, '</h3>', newline));
7575
% else
7676
relpath = "";
7777
% end

test/TestCanonical.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{"", ""}, ...
88
{"not-exist", "not-exist"}, ...
99
{"a/../b", "a/../b"}, ...
10-
{strcat(mfilename("fullpath"), '.m/..'), string(fileparts(mfilename("fullpath")))}, ...
10+
{append(mfilename("fullpath"), '.m/..'), string(fileparts(mfilename("fullpath")))}, ...
1111
{"not-exist/a/..", "not-exist/a/.."}, ...
1212
{"./not-exist", "not-exist"}
1313
};

test/TestSymlink.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function setup_symlink(tc)
2525

2626
tc.link = fullfile(pwd(), 'my.lnk');
2727

28-
tc.target = strcat(mfilename("fullpath"), '.m');
28+
tc.target = append(mfilename("fullpath"), '.m');
2929

3030
tc.assumeTrue(stdlib.create_symlink(tc.target, tc.link), ...
3131
"failed to create test link " + tc.link)

0 commit comments

Comments
 (0)