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
Post a Comment