Home > atmlab > handy > splitstring.m

splitstring

PURPOSE ^

SPLITSTRING Splits string into tokens at given separator.

SYNOPSIS ^

function s = splitstring (p, sep)

DESCRIPTION ^

 SPLITSTRING   Splits string into tokens at given separator.

 FORMAT   s = splitstring (p, sep)
        
 OUT   s   Cell array of strings.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

splitstring.m

SOURCE CODE ^

0001 % SPLITSTRING   Splits string into tokens at given separator.
0002 %
0003 % FORMAT   s = splitstring (p, sep)
0004 %
0005 % OUT   s   Cell array of strings.
0006 
0007 % 2011-01-26   Created by Oliver Lemke.
0008 
0009 
0010 function s = splitstring (p, sep)
0011 
0012 if exist('OCTAVE_VERSION','builtin')
0013   s = strsplit (p, sep, true);
0014 else
0015   s = regexp (p, sep, 'split');
0016 end
0017

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005