[CHANGESET]: strtok should default to using all white space characters to match MATLAB

Jaroslav Hajek highegg at gmail.com
Tue Aug 5 02:42:24 CDT 2008


On Mon, Aug 4, 2008 at 4:59 PM, John W. Eaton <jwe at bevo.che.wisc.edu> wrote:
> On  4-Aug-2008, Ben Abbott wrote:
>
> |
> | On Aug 3, 2008, at 11:02 PM, David Dean wrote:
> |
> | > --------
> | > Bug report for Octave 3.0.0 configured for i486-pc-linux-gnu
> | >
> | > Description:
> | > -----------
> | >
> | > As per title. The default call of strtok only considers spaces to
> | > deliminate tokens. The deliminator should default to be something like
> | > " \t\n" instead of just being " ".
> | >
> | > Repeat-By:
> | > ---------
> | >
> | >> a ="doc\tb"
> | >> [c,d] = strtok(a)
> | > c = doc b
> | > d =
> | >> [c,d] = strtok(a," \t")
> | > c = doc
> | > d =    b
> |
> |
> | Tab (" \t") is added to the default delimiters and an additional test
> | is included.
> |
> | Changeset attached.
>
> I think we also need to include LF (\n), VT (\v), FF (\f), and CR (\r).
>
> I made the change in my sources.
>

And I transplanted this into release-3-0

cheers

> Thanks,
>
> jwe
> _______________________________________________
> Bug-octave mailing list
> Bug-octave at octave.org
> https://www.cae.wisc.edu/mailman/listinfo/bug-octave
>



-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


More information about the Bug-octave mailing list