Splitting a string based on index

Hi Team,

I have string that contains 6420 digits.

I want first 720 digits in one variable and remaining in other variable.

The login i followed was
str_test = mystring_value
str_1 = str_test.Substring(0,720)
str_2 = str_test.Substring(720,str_test.length)
The error i am getting is as below :
Assign: Index and length must refer to a location within the string. (Parameter ‘length’)

Any suggestions would help.

Regards,
Sateesh.

Hi @satish_kumar

Can you try this

str_1 = str_test.Substring(0, 720)
str_2 = str_test.Substring(720, str_test.Length - 720)

Regards,

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