Add whitespace before and after a string in ruby? -


I want to add a white space before and after the random string.

I "Random_string" center (1, "") but this does not work.

Thank you

My Ruby is wild, but nothing is wrong with IMO Do not have

  DRF pad (random) "+ + random +" "end padded_random_string = pad (" random_string ")   

  "random_string" .center ("random_string" .length + 2)  

Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -