Hello there !!
I want to pad a string:
str = "something"
paddedStr = String.pad 10 ' ' str
But that doesn’t work. It keeps returning the initial value.
Any ideas?
Hello there !!
I want to pad a string:
str = "something"
paddedStr = String.pad 10 ' ' str
But that doesn’t work. It keeps returning the initial value.
Any ideas?
hello! String.pad 10 ' ' "something"
returns " something"
for me, so I wonder… are you trying to mutate str
? If not, can you show more of your code? I’m not sure how this could be happening!
Nah I just found out that I was misinterpreting String.pad use.
I got it now.
Thanks for your time!
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.