diff NEWS @ 16411:5be43435bd5b

Improve speed and backward compatibility for strsplit() * scripts/strings/strsplit.m: Improve speed and backward compatibility. * NEWS: Modify entry for strsplit() for Octave 3.8.x.
author Ben Abbott <bpabbott@mac.com>
date Tue, 02 Apr 2013 19:36:52 -0400
parents 1de4ec2a856d
children 34a9a4e48f9b
line wrap: on
line diff
--- a/NEWS	Tue Apr 02 19:43:52 2013 +0200
+++ b/NEWS	Tue Apr 02 19:36:52 2013 -0400
@@ -18,11 +18,11 @@
 ---------------------------------------------------------
 
  ** strsplit has been modified to be compatible with Matlab.  There
-    are three instances where backward compatibility is broken.
+    are two instances where backward compatibility is broken.
 
     (1) Delimiters are now string vectors, not scalars.
 
-    Octave's conventioal behavior
+    Octave's legacy behavior
 
       strsplit ("1 2, 3", ", ")
       ans = 
@@ -43,18 +43,14 @@
       }
 
     (2) By default, Matlab treats consecutive delimiters are as a single
-    delimiter.  By default, Octave's conventional behavior was to return
-    an empty string.
+    delimiter.  By default, Octave's legacy behavior was to return an
+    empty string for the part between the delmiters.
 
-    (3) Octave's conventional implementation supported splitting 2D
-    character arrays.  The Matlab compatible version requires the input
-    string be a row vector.
+    Where the legacy behavior is desired, the call to strsplit() should
+    specify that the delimitertype is "legacy".
 
-    Where the conventional behavior is desired, the in-line function below
-    may be substituted.
-
-    cstrsplit = @(str,del, collapsedelimiters = false) strsplit (strjoin ...
-      (cellstr (str), del(1)), num2cell (del(:)), collapsedelimiters);
+    strsplit (str, del, "collapsedelimiters", false,
+      "delimitertype", "legacy")
 
  ** Octave now supports nested functions with scoping rules that are
     compatible with Matlab.  A nested function is one declared and defined