Return i in for loop

Hi guys,

I have a for loop that compares two chars, and if it matches I want to return i:

int UIControl::getLedIndex(char* id){
	for(int i; i < _ledLength; i++){
		if(_ledLabel[i] == id){
			Serial.println(i); //prints correct index...
			return i; //but doesn't return it
	return -1;

I can’t figure out why it’s always returning -1…


for (int i; Oops

A damnit.. Need a cup of coffee I think