octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

strsplit


From: Juan Pablo Carbajal
Subject: strsplit
Date: Fri, 6 Jun 2014 01:05:53 +0200

Hi,

Is the following behavior correct in strsplit?

strsplit("/usr/local/share/octave/",filesep())
ans =
{
  [1,1] =
  [1,2] = usr
  [1,3] = local
  [1,4] = share
  [1,5] = octave
  [1,6] =
}

strsplit("/usr/local/share/octave/",filesep(),true)
ans =
{
  [1,1] =
  [1,2] = usr
  [1,3] = local
  [1,4] = share
  [1,5] = octave
  [1,6] =
}

strsplit("/usr/local/share/octave/",filesep(),false)
ans =
{
  [1,1] =
  [1,2] = usr
  [1,3] = local
  [1,4] = share
  [1,5] = octave
  [1,6] =
}


The output puts an empty cell element when the matching delimiter is
at the beginning and at the end.
This causes geometry ADD_PKG script to fail, so the behavior changed
not long ago (I remember some mails about this, ml compatibility?).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]