Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
反正有没有简单地把它变成一个 for 循环?
while ((something == false) && (s < string.length-1)){ }
for( <x> ; (something == false) && (s < string.length-1) ; <y> ){ //do whatever }
将您需要声明的任何内容放入 x 中,并将应增加每个循环的任何内容放入 y 中,如果有的话。你也可以在那里什么都没有。
for(int i=false;i<string.length-1;i++)
我认为这会起作用