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

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

gtk - Python Window Resize -

c# - read full xml file data over tcp -