diff NEWS @ 19420:f054112912df

Change strfind to return empty array for empty pattern for compatibility (bug #43649). * NEWS: Announce change. * strfind.cc (Fstrfind): Add note to docstring about change. Return Matrix () if pattern is empty.
author Rik <rik@octave.org>
date Fri, 05 Dec 2014 22:17:09 -0800
parents cc6000ccd627
children 9e5b64b3c1fe
line wrap: on
line diff
--- a/NEWS	Fri Dec 05 15:09:48 2014 -0800
+++ b/NEWS	Fri Dec 05 22:17:09 2014 -0800
@@ -39,6 +39,17 @@
     limit from above is taken.  This criteria is consistent with several other
     numerical analysis software packages.
 
+ ** strfind changes when using empty pattern ("") for Matlab compatibility
+
+    strfind now returns an empty array when the pattern itself is empty.
+    In previous versions of Octave, strfind matched at every character
+    location when the pattern was empty.
+
+      NEW
+      strfind ("abc", "") => []
+      OLD
+      strfind ("abc", "") => [1, 2, 3, 4]
+
  ** Integer formats used in the printf family of functions now work for
     64-bit integers and are more compatible with Matlab when printing
     non-integer values.  Now instead of truncating, Octave will switch