Functions | |
endif | if (ischar(s)) k |
if (isempty(s)||isempty(k)) s | |
endif | elseif (iscell(s)) s |
else | error ("strtrim: expecting string argument") |
endif endfunction!error < Invalid call to strtrim > | strtrim () |
!error< Invalid call to strtrim > | strtrim ("abc","def") |
!assert (strtrim(" abc "),"abc") | |
!assert (strtrim([" abc ";" def "]),["abc ";" def"]) | |
Variables | |
function | s |
!assert | ( | strtrim([" abc ";" def "]) | ) |
!assert | ( | strtrim(" abc ") | , | |
"abc" | ||||
) |
endif elseif | ( | iscell(s) | ) |
if | ( | isempty(s)||isempty(k) | ) |
endif if | ( | ischar(s) | ) |
!error<Invalid call to strtrim> strtrim | ( | "abc" | , | |
"def" | ||||
) |
endif endfunction !error<Invalid call to strtrim> strtrim | ( | ) |