举报
Local $sTestStr = 'abcdefghijklmnopqrstuvwxyz0123456789' MsgBox(0,0,StringReverse($sTestStr))
Local $sTestStr = 'abcdefghijklmnopqrstuvwxyz0123456789' ConsoleWrite('Rev_sTestStr=' & _SwapText($sTestStr) & @CRLF) Func _SwapText($str) Return StringLen($str) ? (StringRight($str, 1) & _SwapText(StringTrimRight($str, 1))) : $str ;返回字符串长度 返回字符串右起指定数量的字符 连接 删除字符串右起指定数量的字符 EndFunc ;==>_SwapText
Local $sTestStr = 'abcdefghijklmnopqrstuvwxyz0123456789' Local $str = '' $test = StringRegExp($sTestStr, '[a-z|\d]', 3) If IsArray($test) Then For $i = 0 To UBound($test) - 1 $str &= $test[UBound($test) - 1 - $i] Next ConsoleWrite($str & @LF) EndIf
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2025-3-14 18:08 , Processed in 0.073619 second(s), 13 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2025 Discuz! Team.