Hi, At Mon, 26 Apr 2004 16:19:04 +0900, daz wrote in [ruby-talk:98364]: > Combining that with recognition of the length specifier: > > =============================== > > case 'Z': > { > char *t = s; > > if (len > send-s) len = send-s; > while (t < s+len && *t) t++; > rb_ary_push(ary, infected_str_new(s, t-s, str)); > if (t < send) t++; > s = star ? t : s+len; > } > break; > > =============================== I'd also considered about it, but > > s = "abc\0def\0\0jkl\0" > > s.unpack('Z6Z*Z*') #-> ["abc", "f", ""] It can't round trip with Array#pack, so I discarded this plan. -- Nobu Nakada