Maybe put the string `"function"` in a static `String` constant, and read its length here (and use it for the comparison below).