You should be able to use a StringArray here for 'fields' and then this code becomes: fields.find(fn);