Hi,

We have ljust and rjust so why not:

class String
  def cjust(width)
    w = width - length
    w > 0 ? rjust(length+w/2+w%2).ljust(width) : self
  end
end

Maybe we're on track for feature bloat here but... ;-)

/Robert