还是得用循环.
$str = 'A'
MsgBox(0, $str, str($str))
$str = 'AB'
MsgBox(0, $str, str($str))
$str = 'ACD'
MsgBox(0, $str, str($str))
$str = 'BDE'
MsgBox(0, $str, str($str))
$str = 'BDEAC'
MsgBox(0, $str, str($str))
$str = 'BDEACPFGHIUUYFUGIUGOUHIUGIYGUGFGOU'
MsgBox(0, $str, str($str))
Func str($string)
Local $Replace, $l
$l = StringSplit(StringUpper($string), "", 0)
For $b = 1 To $l[0]
For $s = 65 To 90
If Chr($s) == $l[$b] Then
;~ $Replace &= $s - 64
$Replace &= $s - 64 & ','
EndIf
Next
Next
;~ Return $Replace
Return StringTrimRight($Replace, 1)
EndFunc ;==>str
|