to find the length of string