stripZeros(String) As String


/ Published in: Visual Basic
Save to your folder(s)

This function removes all leading zeros at the beginning of a string.


Copy this code and paste it in your HTML
  1. Private Function stripZeros(str As String) As String
  2. If (Left(str, 1) = "0" And Len(str) > 1) Then
  3. stripZeros = stripZeros(Mid(str, 2))
  4. Else
  5. stripZeros = str
  6. End If
  7. End Function

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.