ASCII To Decimal

This algorithm converts ASCII code to decimal numbers.



									Public Shared Function ASCIIToDecimal(str As String) As String
	Dim dec As String = String.Empty

	For i As Integer = 0 To str.Length - 1
		Dim [cDec] As String = CByte(AscW(str(i))).ToString()

		If [cDec].Length < 3 Then
			[cDec] = [cDec].PadLeft(3, "0"c)
		End If

		dec += [cDec]
	Next

	Return dec
End Function
								


Example

									Dim data = "Programming Algorithms"
Dim value = ASCIIToDecimal(data)
								


Output

									080114111103114097109109105110103032065108103111114105116104109115