Refactor IndexOfFtw to use char arrays.