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.
1 parent ff32745 commit 639367eCopy full SHA for 639367e
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