1 | static S firstLine(S text) { |
2 | if (text == null) null; |
3 | int i = text.indexOf('\n'); |
4 | ret i >= 0 ? text.substring(0, i) : text; |
5 | } |
Began life as a copy of #1001797
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1002554 |
Snippet name: | firstLine |
Eternal ID of this version: | #1002554/2 |
Text MD5: | 2622f915249f6dccab37f7d3d0ceb35e |
Author: | stefan |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-09-30 22:41:34 |
Source code size: | 134 bytes / 5 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 826 / 792 |
Version history: | 1 change(s) |
Referenced in: | [show references] |