1function out=strstrip(in)
2%STRSTRIP: clean up the beginning and the end of a character string
3 if ~mr.aux.isOctave
4 if ~isempty(in)
5 out=strip(in);
6 else
7 out=in;
8 end
9 else
10 % octave doen't have strip
11 while ~isempty(in) && (in(1)==' ' || in(1)=="\t" || in(1)=="\r" || in(1)=="\n")
12 in(1)=[];
13 end
14 while ~isempty(in) && (in(end)==' ' || in(end)=="\t" || in(end)=="\r" || in(end)=="\n")
15 in(end)=[];
16 end
17 out=in;
18 end
19end