Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function ConvertBase(Source As Int64, Base As String = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz") As String
- If Source = 0 Then Return "0"
- Dim work As Int64 = Source
- Dim ret As String = ""
- Dim sign As String = ""
- If work < 0 Then
- sign = "-"
- work = Abs(work)
- End If
- Dim i As Integer
- While work <> 0
- i = (work Mod Len(Base))
- ret = Mid(Base, i + 1, 1) + ret
- work = work / Len(Base)
- Wend
- Return sign + ret
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement