From: brabuhr@... Date: 2006-05-19T05:27:38+09:00 Subject: Re: String#nstrip ? > > When using the Win32API package, I often have to resort to this idiom > > to get a string out of a buffer: > > > > string.split(0.chr).first > > > > The problem is that it's kinda slow. No, I can't use String#rstrip or > > String#gsub because often there's other junk at the end of the string that > > would prevent those methods from working. > > > > What about adding a String#nstrip (null strip) method that would return a > > string up to the first NULL character? > > Ok, nevermind. :) In the case that someone else may have this same need, I added a link to this thread to the annotations for String#split on the annotated Ruby documentation at: http://ruby.outertrack.com/class/String/split#notessec