How to trim a number in a string variable?

Hi all,
I need to trim a number in a string variable, for example “1001528” and get “1” and “001528”, is this possible?
i tried using the method split but it separate word by word in a string, and i need trim just the first number.
thanks you so much.

You might use Substring method


1 Like

Try this

strVariable.substring(0,1) for the “1”
strVariable.substring(1) for the rest string


@J0ska @syedabidraza thank you so much guys, that is the solution. :heart:

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