[project @ 2003-02-14 01:08:38 by jwe]
author |
jwe |
date |
Fri, 14 Feb 2003 01:08:38 +0000 |
parents |
cc3a9c2608bd |
children |
0b24abe1ba0b |
files |
scripts/ChangeLog scripts/strings/findstr.m |
diffstat |
2 files changed, 6 insertions(+), 2 deletions(-)
[+]
|
line diff
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,7 @@
+2003-02-13 Schloegl Alois <alois.schloegl@tugraz.at>
+
+ * strings/findstr.m: Return empty set for zero-length target.
+
2003-02-11 Paul Kienzle <pkienzle@users.sf.net>
* set/union.m: Preserve the orientation of inputs.
--- a/scripts/strings/findstr.m
+++ b/scripts/strings/findstr.m
@@ -63,8 +63,8 @@
l_t = length (t);
if (l_t == 0)
- ## zero length target: return all indices
- v = 1:l_s;
+ ## zero length target: return empty set
+ v = [];
elseif (l_t == 1)
## length one target: simple find