I have the next String
OrderNum = “02017586”
I want to remove the 1st digit that the result will be
OrderNum = “2017586”
How to do that please ?
1 Like
1 Like
Hi @mironb
If you wanted to remove only if the first number is zero then please use the syntax in the above mentioned post.
If you want to remove any number which is in the first position means then please use the below syntax.
OrderNum = "02017586"
OrderNum.Remove(0,1)
Regards
OrderNum.SubString(1)
Can Also Follow this Method
Where charcterList is Ienumerable of char
Or
hi @mironb
Value=OrderNum.Substring(1, OrderNum.Length - 1)
or
Value=OrderNum.Substring(1)
Thanks!
Hi ,
->you can use substring(1) to removes the first digit.
->Can use Remove(0, 1) ,removes one digit starting from the index 0
->Can also convert string to array of characters and skip first character.
OrderNum.Substring(1)