From: djberg96@... (Daniel Berger) Date: 2004-04-25T11:14:05+09:00 Subject: Re: String#unpack and null-terminated strings Michael Neumann wrote in message news:<20040424221220.GA6199@miya.intranet.ntecs.de>... > Hi, > > How can I unpack two or more consecutive C-strings with the > String#unpack method? Like this: > > "abc\000def\000".unpack("??") # => ["abc", "def"] > > Currently, this seems not to be possible. Any chance to get the > following patch applied, which implements exactly this? > > > Regards, > > Michael "abc\000def\000".unpack("A3xA3") # => ["abc","def"] Using the example you later posted... "\100String\000\100".unpack("CA6xC") # => [64,"String",64] Regards, Dan