indexOf question

Hello everyone,

is it possible to use indexOf to learn the length of an input text?

Or is there a much easier way?