不知道这算不算一个BUG??
悲催的码农 2008-08-06 10:57:56 废话不说,直接看代码:
filePath = "1111abcdefghijklmnabcdefghij";
authorImage.setText(filePath);
int index = filePath.lastIndexOf("a");
int index_t = filePath.lastIndexOf("c",index);
authorImageName.setText(filePath.substring(index+1, index+index_t));
结果:index=18 (正确) index_t=6 (无法理解)
按我的想法index_t=2 不知道坛子里面的高手怎么解释这个问题