Skip to content

Commit 639367e

Browse files
committed
Create: 0058-Length-Of-Last-Word.dart
1 parent ff32745 commit 639367e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: dart/0058-length-of-last-word.dart

+6
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)