To find the length of a string in the dart, we make use of the length property of a string class in Dart. This method returns the length of the string, which is an integer.
Syntax: string_name.length
Return Type: Integer
Image Representation:

Find the length of the string
Example:
// Main function
main() {
// Declaring a string variable
String gfg = "Geeks For Geeks";
// Finding the length
int length = gfg.length;
// Printing the length of the string
print(length);
}
Output:
15Explanation: The length of the string, including spaces in the above example, counts up to 15.
Note: The length of the empty string is equal to 0.