1 | static int lineNrToCharIndex(S s, int lineNr) {
|
2 | int i = 0; |
3 | while (--lineNr > 0) |
4 | i = smartIndexOf(s, '\n', i)+1; |
5 | ret i; |
6 | } |
Began life as a copy of #1005051
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1015095 |
| Snippet name: | lineNrToCharIndex - user-land line numbers (counting from 1) |
| Eternal ID of this version: | #1015095/1 |
| Text MD5: | 5d24c2fc61bd0784da1a561e0e3424fa |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-05-08 12:12:26 |
| Source code size: | 135 bytes / 6 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 619 / 669 |
| Referenced in: | [show references] |