Libraryless. Click here for Pure Java version (114L/1K).
1 | static int countSpacesAtEnd(S s) {
|
2 | int n = l(s), i = n; |
3 | while (i > 0 && s.charAt(i-1) == ' ') |
4 | --i; |
5 | ret n-i; |
6 | } |
Began life as a copy of #1025779
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): gjtlkbvenryc, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1037267 |
| Snippet name: | countSpacesAtEnd |
| Eternal ID of this version: | #1037267/1 |
| Text MD5: | 87d1eae168814a92789dbd62d283607c |
| Transpilation MD5: | 72b65911da0b19d420550170ef6c614d |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2023-11-26 21:58:51 |
| Source code size: | 126 bytes / 6 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 480 / 640 |
| Referenced in: | [show references] |