1 | static S text2floatingLetters(S text) { |
2 | new L<S> out; |
3 | int x = 0, y = 0; |
4 | for (char c : stringAsList(text)) { |
5 | if (eq(c, '\n')) { |
6 | x = 0; |
7 | y += 8; |
8 | } else if (eq(c, '\t')) |
9 | x += 8*tabSize(); |
10 | else if (eq(c, '\r')) {} |
11 | else { |
12 | if (!isWhiteSpace(c)) |
13 | out.add("Char " + quote(c) + " at (" + x + " " + y + "*8 8)"); |
14 | x += 8; |
15 | } |
16 | } |
17 | ret lines(out); |
18 | } |
Began life as a copy of #1008937
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: | #1008941 |
Snippet name: | text2floatingLetters |
Eternal ID of this version: | #1008941/1 |
Text MD5: | 2b43dc0950eeaa069554dd524b706410 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-06-20 00:05:05 |
Source code size: | 415 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 558 / 609 |
Referenced in: | [show references] |