Navigation

Operators and Keywords

Function List:

C++ API

strsplit.m File Reference


Functions

endif if (isempty(p)) s
else if (isscalar(sep)) idx
endif if (isempty(idx)) sizes
endif p (idx)
 if (strip_empty) sizes
endif endfunction !assert (all(strcmp(strsplit("road to hell"," "),{"road","to","hell"})))%!assert(all(strcmp(strsplit("road to^hell"

Variables

function s
else idx = strchr (p, sep)
else sizes = [idx(1)-1, diff(idx)-1, numel(p)-idx(end)]

Function Documentation

endif endfunction !assert ( all(strcmp(strsplit("road to hell"," "),{"road","to","hell"}))   ) 

if ( strip_empty   ) 

endif if ( isempty(idx)   ) 

else if ( isscalar(sep  ) 

endif if ( isempty(p)   ) 

endif p ( idx   ) 


Variable Documentation

else idx = strchr (p, sep)

endif s

Initial value:

 strsplit (p, sep, strip_empty = false)

  if (nargin < 2 || nargin > 3 || ! ischar (p) || rows (p) > 1
      || ! ischar (sep) || ! islogical (strip_empty))
    print_usage ()

else sizes = [idx(1)-1, diff(idx)-1, numel(p)-idx(end)]