finds the length of a string