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

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -