I have a string
‘00050’. I need to remove all the 0’s before the 5 but keep any after. The number can come in with any number of 0’s. It could be ‘00504’ ‘051’ for example.
Any suggestions?
Thanks
I have a string
‘00050’. I need to remove all the 0’s before the 5 but keep any after. The number can come in with any number of 0’s. It could be ‘00504’ ‘051’ for example.
Any suggestions?
Thanks
Please see if this helps:
This will work -
strNumbers = “001001011”
strNumbers.TrimStart("0"c).ToString
return “1001011”
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.