How to Find the Length of a String in Dart? Read Courses Practice Improve Improve Improve Like Article Like Save Article Save Report issue Report To find a length of a string in the dart, we make use of length property of a string class in Dart. This method returns the length of string which in integer. Syntax: string_name.length Return Type: integer Example: Finding the length of the string in Dart. Dart // Main function main() { // Declaring a string variable String gfg = "Welcome to GeeksForGeeks"; // Finding the length int length = gfg.length; // Printing the length of the string print(length); } Output: 24 Explanation: The length of the string including spaces in the above example count up to 24. Note: The length of the empty string is equal to 0. Last Updated : 15 Jul, 2020 Like Article Save Article Previous Dart - Convert All Characters of a String in Lowercase Next How to Check String is Empty or Not in Dart (Null Safety)? Share your thoughts in the comments Add Your Comment Please Login to comment...