Mercurial > hg > octave-nkf
comparison scripts/strings/split.m @ 8168:dadf478ddc42
fix empty string assignment
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 30 Sep 2008 09:19:43 +0200 |
parents | 83a8781b529d |
children | 502e58a0d44f |
comparison
equal
deleted
inserted
replaced
8167:17352ccd860e | 8168:dadf478ddc42 |
---|---|
105 | 105 |
106 %!assert(all (strcmp (split ("foo bar baz", " ", 2), ["foo"; "bar baz"]))); | 106 %!assert(all (strcmp (split ("foo bar baz", " ", 2), ["foo"; "bar baz"]))); |
107 | 107 |
108 %!error split ("foo", "bar", 3, 4); | 108 %!error split ("foo", "bar", 3, 4); |
109 | 109 |
110 %!assert (all (strcmp (split("road//to/hell","/"), ["road"; " "; "to "; "hell"]))) | |
111 | |
112 %!assert (all (strcmp (split("/road/to/hell/","/"), [" "; "road"; "to "; "hell"; " "]))) | |
113 | |
114 |