Insert n character into start of string

Hi everyone.

I want to insert number of character into string.

example: String “Hello”… how to insert “0” with four time into string “0000Hello”

I have used text.insert(0,“0”) … but it only insert “O” only one time. How to add number of “O” char want to add??

Thanks you!

Hi,

Can you try the following?

New String("0"c,4)+text

If you want to insert at any position, the following will work.

text.Insert(0,New String("0"c,4))

Regards,

1 Like

Thanks you so much bro

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.