From: Robert Klemme Date: 2004-09-23T21:44:38+09:00 Subject: Re: String#pad ? "Jani Monoses" schrieb im Newsbeitrag news:4152AEEF.1060208@iv.ro... > > Did you mean to say "multiple of two"? 'Cause that's what your code seems > > to be doing. > > definitely my bad wording since I mislead both of you :) > > I just thought that something out of the box to do this would be nice > > String#pad and String#pad! > > data.pad!(n) #pad data to next 2^n boundary > > or maybe powers of two are two restrictive than make n actually mean that make the strings > length a multiple of n. IMHO this application is not general enough. Also, the name #pad does by no means imply that the length will be n*m after invocation. For the general case there is already #ljust and #rjust. I'd vote against having these methods with the functionality you propose in the std lib. Regards robert