finish.m

来自「M2HTML by itself generates an HTML docum」· M 代码 · 共 32 行

M
32
字号
function str = finish(str,unknowns)%TEMPLATE/FINISH Apply given strategy to unknown fields in a string%  STR = FINISH(STR,UNKNOWNS) applies on string STR the strategy defined%  in UNKNOWNS to unknowns fields '{UNKNOWNS_FIELDS}'.%  UNKNOWNS may be:%    * 'keep' to do nothing%    * 'remove' to remove all undefined fields%    * 'comment' to replace undefined fields by a warning HTML comment.%  This function uses Matlab REGEXPREP function coming with R13. If you%  hold an older version, please comment lines 38 and 42: then you can %  only apply the 'keep' strategy.%  Copyright (C) 2003 Guillaume Flandin <Guillaume@artefact.tk>%  $Revision: 1.0 $Date: 2003/05/05 22:19:51 $error(nargchk(2,2,nargin));switch lower(unknowns)	case 'keep'		%- do nothing	case 'remove'		%%%%%%%%%%%%%%%%%%%%%%%% WIH REGEXP ONLY %%%%%%%%%%%%%%%%%%%%		% str = regexprep(str,'{[^ \t\r\n}]+}','');		%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%	case 'comment'		%%%%%%%%%%%%%%%%%%%%%%%% WIH REGEXP ONLY %%%%%%%%%%%%%%%%%%%%		% str = regexprep(str,'{[^ \t\r\n}]+}','<!-- Template variable undefined -->');		%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%	otherwise		error('[Template] Unknown action.');end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?