Efthimios Bothos wrote:
> Hi,
>    I am trying to format some text using sprintf. The text itself
> contains the percent sign (%).
> 
> When I use it without any escape character, as expected ruby throws
> error (unkonown format sequence).
> 

I'm not seeing that:

str = "hello%world"
new_str = sprintf('%20s', str)
puts new_str

--output:--
         hello%world


It's always baffling to me why a poster doesn't just post a simplified 
example along with the error.
-- 
Posted via http://www.ruby-forum.com/.