This method returns the number of characters in the string.
length(str)
str − The source string
This method returns the number of characters in the string.
/* Main program */ a = "Hello World" say length(a)
When we run the above program, we will get the following result.
11