Substring/Top and tail: Difference between revisions

Substring/Top and tail in Dart
(Substring/Top and tail in Applesoft BASIC, Chipmunk Basic and MSX Basic)
(Substring/Top and tail in Dart)
Line 706:
sock
room</pre>
 
=={{header|Dart}}==
<syntaxhighlight lang="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)} !");
}</syntaxhighlight>
{{out}}
<pre>Same as C++ entry.</pre>
 
=={{header|Delphi}}==
2,156

edits