devxlogo

Get Rid of Leading Zeros

Get Rid of Leading Zeros

Eliminate “leading-zeros” in a text string in this interestingway:

 instring$ = "00030"     ' set the string with some leading-zeros' now to get rid of them....instring$ = CStr(Cint(instring$))' now instring$ should contain "30"' Another way...instring$ = "00030"     ' set the string with some leading-zeros' now to get rid of them....instring$ = Val(instring$)' now instring$ should contain "30"

devx-admin

Share the Post: