[Scilab-Dev] SEP 26 : strsplit(), add the capability to split a string on a pattern.

bernard.hugueney at scilab.org bernard.hugueney at scilab.org
Wed May 6 11:39:26 CEST 2009


On Wed, 06 May 2009 10:55:30 +0200, Pierre MARECHAL
<pierre.marechal at scilab.org> wrote:
> Hi all,
> 
> Please find attached SEP #26 
>
<http://gitweb.scilab.org/?p=scilab.git;a=blob;f=SEP/SEP_26_extends_strsplit.odt;h=e605e5c37ad473538e4851c59fb944c04552bdaa;hb=HEAD>
> 
> (V1.0) about strsplit(). This SEP proposes to add the capability to 
> split a string on a single character, a group of characters or a regular 
> expression (a pattern).
> 

Hi,
Two comments based on crusory reading :

1) I'd take a vector (matrix) of strings as args n°2 and split on any of
the strings 
-> allows to split on different separators for users without regex
knowledge

2) I'd accept an optional second return value that would be a vector of the
matched separators.
-> might be useful for debugging regexp separators
-> allows easy reconstruction of the original string.

That the only complaints I could think of so far, so kudos for the good SEP
! :)

Best regards,
Bernard




More information about the dev mailing list