From: Josef 'Jupp' Schugt Date: 2003-05-02T07:40:36+09:00 Subject: Re: ljust, rjust... Saluton! * Chris Pine ; 2003-05-01, 20:55 UTC: > How about allowing `ljust' and `rjust' take an additional parameter (which > defaults to the string " ") which specifies what it justifies with? > > 15.to_s.rjust(5) # --> " 15" > 15.to_s.rjust(5,'0') # --> "00015" > 15.to_s.rjust(5,'blue') # --> "blu15" If that is to be implemented one needs to define what 15.10.to_s.rjust(10,'ppm ') should result in because there are two possiblities: 'ppm pp15.1' or 'ppm 15.1' - both makes sense. Gis, Josef 'Jupp' Schugt -- | /""""\ e-mails that do not contain plain text, are larger than | | / STOP \ 50 KiB, are unsolicited, or contain binarys are ignored | | \ SPAM / unless payment from your side or technical reasons give | | \____/ rise to a non-standard treatment. ______________________|