我想取一个普通的字符串,并返回一个仅包含大写字母索引的数组。
所以基本上:
var str1:String = "TextT STufF" var capArray = [0,3,5,6,9]
我可以为这样的空间做到这一点:
for(var n5=0; n5 < str1.length; n5++)
{
numSpace = str1.indexOf(" ", numSpace+1); //That space is what determines it. How do I make it search for all Caps?
if(numSpace == -1)
{
n5 = str1.length;
}
else{arySpaceInd[n5] = numSpace;}
}
trace(aryVerse);
可以为首都做吗?