📄 remstr.m
字号:
function outstr = remstr(instr,rem)
% REMSTR Remove string from callback string.
% STR1 = REMSTR(STR,REM) removes all occurrences of string REM from
% string STR.
% Removes a preceding comma if there is one and nothing following.
% Copyright (c) 1988-98 by The MathWorks, Inc.
% $Revision: 1.5 $
% T. Krauss 11/21/94
if length(rem) == 0
outstr = instr;
else
if length(rem)>length(instr)
outstr = instr;
else
outstr = instr;
ind = findstr(outstr,rem);
for i = 1:length(ind)
outstr(ind(i)-(i-1)*length(rem)+(0:length(rem)-1)) = [];
end
% now remove trailing comma separator if present
if length(outstr)>0
ind = length(outstr);
while (outstr(ind)==' ')
ind = ind-1;
end
if instr(ind)==','
outstr(ind:length(outstr)) = [];
end
end
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -