Functions | |
endif | if (ischar(op)) op |
if (strcmp("wildcard", op)) y | |
elseif (strcmp("escape", op)) ch | |
endfor else | error ("regexptranslate: unexpected operation") |
endif else | error ("regexptranslate: expecting operation to be a string") |
endif endfunction!error < Invalid call to regexptranslate > | regexptranslate () |
!error< Invalid call to regexptranslate > | regexptranslate ("wildcard") |
!error< Invalid call to regexptranslate > | regexptranslate ("a","b","c") |
!error< unexpected operation > | regexptranslate ("foo","abc") |
!error< expecting operation to be a string > | regexptranslate (10,"abc") |
!assert (regexptranslate("wildcard","/a*b?c."),"/a.*b.c\\.")%!assert(regexptranslate("escape" | |
Variables | |
function | y |
for | i |
!assert | ( | regexptranslate("wildcard","/a*b?c.") | , | |
"/a.*b.c\\." | ||||
) |
elseif | ( | strcmp("escape", op) | ) |
if | ( | strcmp("wildcard", op) | ) |
!error<unexpected operation> regexptranslate | ( | "foo" | , | |
"abc" | ||||
) |
!error<Invalid call to regexptranslate> regexptranslate | ( | "a" | , | |
"b" | , | |||
"c" | ||||
) |
!error<Invalid call to regexptranslate> regexptranslate | ( | "wildcard" | ) |
endif endfunction !error<Invalid call to regexptranslate> regexptranslate | ( | ) |
y |
Initial value:
regexptranslate (op, x) if nargin != 2 print_usage ()