Hi, I have a question regarding strip. I wrote a DLL in other language, and used the following to call the dll function in ruby: arg = " " * 100 myfunc.Call(arg) after that arg may contain a string such as: "return value\000" I used strip, but the strip does not strip away terminating null character... Am I doing something wrong? If I suggest that strip should also strip the \000, is it a good idea or not? Shannon On Tue, 22 Jul 2003 11:07:08 +0900 matz / ruby-lang.org (Yukihiro Matsumoto) wrote: > Hi, > > In message "Should String#strip take a parameter?" > on 03/07/22, "Warren Brown" <wkb / airmail.net> writes: > > | If there is an interest in this, I can provide patches for 1.6.8 and/or > |the latest 1.8 snapshot. > > We need to define the behavior first. Python 2.3's strip takes a > parameter, but it strips off all characters in the string, i.e. > > a = "<><<>>>><abc>><><>" > a.strip("<>") # => "abc" > > matz. -- Xiangrong Fang <xrfang / hotmail.com>