How to create empty string up to certain size

Hello all.
Noob question, New to UE4.

If I have a string (username) of say “unreal” the length is 6, how do I go about adding empty string up to max of 40 length?

You could get the length of the string with the “Len” node and check if it is greater then 40, if so then minus that value by 40 and feed this into a “Left Chop” string node which will give you the first 40 characters of the string and chop off the rest.

What Steve suggested might work but there’s a neater way of achieving precisely what you’ve described:

257695-capture.png

The returned string here will have 3 characters and 37 trailing spaces.

Ahh cool, didn’t know about that one. I knew there had to be a better way when I was looking at the chops.