Reputation: 1219
Is there anyway to simply TURN this into a for loop?
while ((something == false) && (s < string.length-1)){ }
Upvotes: 0
Views: 81
Reputation: 103
for(int i=false;i<string.length-1;i++)
I am thinking that this will work
Upvotes: 0
Reputation: 2967
for( <x> ; (something == false) && (s < string.length-1) ; <y> ){
//do whatever
}
put into x whatever you need to declare and into y whatever should increment everyloop, if anything. You can have nothing in there too.
Upvotes: 2