Removing leading zeros from string

How to remove leading zeros from a string ?
suppose I have a string = 00012304905

I want to remove leading zeros to get the output as 12304905.

can someone help me with this ?

1 Like


Just convert your string into a double and it will be fine!

Best regards,

but I need a string type variable only as output



Convert it to Double/Int will remove the leading 0, as mentioned by @melanie. With tostring() you will get back the number in string


It’s as simple as this

Use a expression like this

str_output = str_input.ToString.TrimStart(“0”c).ToString

Where str_output is of type string variable

Cheers @amangupta4644

1 Like

Thanks @Palaniyappan . It worked

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