0
我有一个字符串输入字符串操作
"abc def 50 ghi jhk lmn 63 op qrst"
我需要输出该字符串在反向而不触摸
"tsrq po 63 nml khj ihg 50 fed cba"
我创建一个vb函数
function strWords(s,length)
strWords = ""
s = replace(s,")"," ( ")
s = replace(s,"("," ) ")
s = replace(s,"-","- ")
s = replace(s," ( "," (")
s = replace(s," ) ",") ")
dim sArray
sArray = split(s)
counter = 0
for i = 0 to ubound(sArray)
tempStr = sArray(i)
counter = counter + len(tempStr)
if len(tempStr) => 1 then
if Asc(left(tempStr,1)) => Asc("0") and Asc(left(tempStr,1)) <= Asc("9") then
strWords = tempStr & " " & strWords
else
strWords = StrReverse(tempStr) & " " & strWords
end if
end if
if counter > 20 then
strWords = "<br>" & strWords
counter = 0
end if
next
端函数的数
问题是我需要将字符串拆分为+ -10个字符。这样
" 50 fed cba"
"nml khj ihg "
"tsrq po 63 "
你可以做到底格式的休息(休息添加和转义)。我没有将这些添加到上面的代码中... – potatopeelings 2010-07-21 06:13:01