But if you really want to get rid of all leading hex zeroes and don't care about the resultant length, then run the full hex string through something like:
Sub TrimLeadingZeroes(S As String)
Dim StartFrom As Int = 0
For I = 0 To S.Length - 2
If S.CharAt(I) = "0" Then
StartFrom = I + 1
Else
Exit
End If
Next
Return S.SubString(StartFrom)
End Sub
Bonus: works for decimal, octal and binary numeric strings too ?