Complete a String with some character

Hello every one, I am trying to make a txt file, but this file must have inside a layout, so is there a function to complete a String with some character no mather the lenght of the string , for example 

A string must have  only seven characters, and the String is "txt", so I want to complete the rest of the 7 characters with "*" like this:



Is there a function that doe's this? or do I need to create that function?

Best Regards 


Hi Rafael,

There is no such built in function but you can use string replace function with string length to achieve the same.

Hello Rafael.

The usual trick to pad string is to append your text to a really long repeated string and cut it accordingly.

This example is with '*' and size 7. You can do it to something else in many sizes.


Hello Rafael

There are a built-in function to do that. Take a look on FormatText function.