Entering characters in the middle of string

For example, I have this string “15102019155246” and if it less than 14, i need add a number in the third position

Use string.Length and string.Insert.

Hi
The expression be like this
If str_input = “15102019155246”
Then In assign activity
str_output = IF(str_input.Length<14,str_input.Insert(2,”anynumber”).ToString,str_input.ToString)

Where 2 is the index position and it starts from 0 for first character

Cheers @brunofl

2 Likes

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