Functions | |
endif | if (ischar(s)) nc |
if (abs(offset) > 0 &&abs(offset)<=nc) if(offset< =0) offset+ | |
endif | if (nargin==2) eos |
endif | if (eos<=nc) t |
else | error ("substr: length = %d out of range", len) |
endif else | error ("substr: expecting string argument") |
endif endfunction | !assert (strcmp(substr("This is a test string", 6, 9),"is a test")) |
!error | substr () |
!error | substr ("foo", 2, 3, 4) |
Variables | |
function | t |
else | eos = offset + len - 1 |
endif endfunction !assert | ( | strcmp(substr("This is a test string", 6, 9),"is a test") | ) |
else error | ( | ) |
endif if | ( | ischar(s) | ) |
!error substr | ( | "foo" | , | |
2 | , | |||
3 | , | |||
4 | ||||
) |
!error substr | ( | ) |