RosettaCodeData/Task/Substring-Top-and-tail/Dart/substring-top-and-tail.dart
2023-07-01 13:44:08 -04:00

6 lines
263 B
Dart

void main() {
String word = "Premier League";
print("Without first letter: ${word.substring(1)} !");
print("Without last letter: ${word.substring(0, word.length - 1)} !");
print("Without first and last letter: ${word.substring(1, word.length - 1)} !");
}