Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
13
Task/Strip-block-comments/MATLAB/strip-block-comments.m
Normal file
13
Task/Strip-block-comments/MATLAB/strip-block-comments.m
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
function str = stripblockcomment(str,startmarker,endmarker)
|
||||
while(1)
|
||||
ix1 = strfind(str, startmarker);
|
||||
if isempty(ix1) return; end;
|
||||
ix2 = strfind(str(ix1+length(startmarker):end),endmarker);
|
||||
if isempty(ix2)
|
||||
str = str(1:ix1(1)-1);
|
||||
return;
|
||||
else
|
||||
str = [str(1:ix1(1)-1),str(ix1(1)+ix2(1)+length(endmarker)+1:end)];
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
Loading…
Add table
Add a link
Reference in a new issue