Global $AscII[24][2] = [[45217,65],[45253,66],[45761,67],[46318,68],[46826,69],[47010,70],[47297,71],[47614,72],[48119,74],[49062,75],[49324,76],[49896,77],[50371,78],[50614,79],[50622,80],[50906,81],[51387,82],[51446,83],[52218,84],[52698,87],[52980,88],[53689,89],[54481,90],[62290,0]]
Func _StringToLetter($sString)
Local $sReturn = ''
Local $sStringLen = StringLen($sString)
For $sI = 1 To $sStringLen
$sReturn &= _Letter2Alphabet(StringMid($sString,$sI,1))
Next
Return $sReturn
EndFunc
Func _Letter2Alphabet($sLetter)
If BinaryLen(StringToBinary($sLetter, 4)) = 3 Then $sLetter &= Chr(0)
Return _Num2Alphabet(Dec(StringTrimLeft(StringToBinary($sLetter),2)))
EndFunc
Func _Num2Alphabet($sDigital)
For $sI = 0 To 22
If BitAND($sDigital>=$AscII[$sI][0],$sDigital<$AscII[$sI+1][0]) Or $sDigital=$AscII[$sI][1] Or $sDigital=32+$AscII[$sI][1] Then Return Chr($AscII[$sI][1])
Next
For $sI = 48 To 57
If $sDigital=$sI Then Return Chr($sI)
Next
Return ''
EndFunc
|