Remove Zeroes At the Start of the Number

I Have Some Number Like this :

000719
000006752
005429
00000000096452

I want to remove all Zeroes at the start of all numbers and print them like these :

719
6752
5429
96452

Hi,

variable.replace("0","")

I believe you should not use like this as it will remove all the zeros including the ones in between the numbers.

To remove zeros only at the starting, you can use the below function.

variable.TrimStart("0"c)

Thanks

2 Likes

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