Ignore:
Timestamp:
Oct 8, 2014, 8:51:12 PM (10 years ago)
Author:
sommeria
Message:

xmltree_updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/@xmltree/private/xml_findstr.m

    r723 r820  
    2020%
    2121%   See also STRFIND, FINDSTR
     22%_______________________________________________________________________
     23% Copyright (C) 2002-2008  http://www.artefact.tk/
    2224
    23 %   Guillaume Flandin
    24 %   Copyright 2002 INRIA Sophia Antipolis
    25 %   $Revision: 1.0 $  $Date: 2002/04/10 22:50:32 $
    26 %   Implemented in a MATLAB mex file.
     25% Guillaume Flandin <guillaume@artefact.tk>
     26% $Id: xml_findstr.m 2271 2008-09-30 21:19:47Z guillaume $
    2727
    28 error(sprintf('Missing MEX-file: %s', mfilename));
     28%error(sprintf('Missing MEX-file: %s', mfilename));
     29
     30persistent runonce
     31if isempty(runonce)
     32    warning(sprintf(['xml_findstr is not compiled for your platform.\n'...
     33    'This will result in a slowdown of the XML parsing.']));
     34    runonce = 1;
     35end
     36
     37% k = regexp(s(i:end),p,'once') + i - 1;
     38if nargin < 3, i = 1;   end
     39if nargin < 4, n = Inf; end
     40j = strfind(s,p);
     41k = j(j>=i);
     42if ~isempty(k), k = k(1:min(n,length(k))); end
Note: See TracChangeset for help on using the changeset viewer.