Hi all,
I find the following code from B4A forum and I want to use it in my B4I project.
But seems "Bit.ToHexString" can't be use in B4I, can anyone teach me how to modify this code in order to use it in B4I please?
Thanks!
I find the following code from B4A forum and I want to use it in my B4I project.
But seems "Bit.ToHexString" can't be use in B4I, can anyone teach me how to modify this code in order to use it in B4I please?
Thanks!
convert string to unicode:
Sub UnicodeEscape (s As String) As String
Dim sb As StringBuilder
sb.Initialize
For i = 0 To s.Length - 1
Dim u As String = Bit.ToHexString(Asc(s.CharAt(i)))
sb.Append("\u")
For i2 = 1 To 4 - u.Length
sb.Append("0")
Next
sb.Append(u)
Next
Return sb.ToString
End Sub