Answers for "text substring dart"

1

dart substring

void main() { 
   String str1 = "Hello World"; 
   print("New String: ${str1.substring(6)}"); 
   
   // from index 6 to the last index 
   print("New String: ${str1.substring(2,6)}"); 
   
   // from index 2 to the 6th index 
}
Posted by: Guest on November-13-2021
0

text substring dart

String str = "Hello World";
// min - 0  max - 10
str.substring(0,10); // Hello Worl
// start- 10 to finished
str.substring(10); // d
Posted by: Guest on January-10-2022

Code answers related to "Dart"

Browse Popular Code Answers by Language