We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3f05d31 + 639367e commit 8fd0ffaCopy full SHA for 8fd0ffa
dart/0058-length-of-last-word.dart
@@ -0,0 +1,6 @@
1
+class Solution {
2
+ int lengthOfLastWord(String s) {
3
+ final words = s.trim().split(" ");
4
+ return words[words.length - 1].length;
5
+ }
6
+}
0 commit comments