📄 findunquoted.m
字号:
function[index]=findunquoted(s1,s2)%FINDUNQUOTED Finds unquoted instances of one string inside another%% FINDUNQUOTED(A,B) where A and B are strings, finds unquoted% instances of A inside B, and returns and an array specifiying % the position within B of the first letter of each occurrence.%% For example% findunquoted('apple',['banana apple ''apple'' apple'])% returns [8 22]. % _________________________________________________________________% This is part of JLAB --- type 'help jlab' for more information % (C) 2002, 2004 J.M. Lilly --- type 'help jlab_license' for details %findunquoted('==',['plot(1:100);x==10;title([''Tests whether x==10''])']) index=findstr(s1,s2);bool=isquoted(s1,s2);if ~isempty(find(bool)) index=index(find(~bool));end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -