SyntaxFix
Write A Post
Hire A Developer
Questions
Code to avoid returning an empty string ( when input is like "00000").
string myStr = "00012345"; myStr = myStr.TrimStart('0'); myStr = myStr.Length > 0 ? myStr : "0";