Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

18
LINES

< > BotCompany Repo | #1008941 - text2floatingLetters

JavaX fragment (include)

static S text2floatingLetters(S text) {
  new L<S> out;
  int x = 0, y = 0;
  for (char c : stringAsList(text)) {
    if (eq(c, '\n')) {
      x = 0;
      y += 8;
    } else if (eq(c, '\t'))
      x += 8*tabSize();
    else if (eq(c, '\r')) {}
    else {
      if (!isWhiteSpace(c))
        out.add("Char " + quote(c) + " at (" + x + " " + y + "*8 8)");
      x += 8;
    }
  }
  ret lines(out);
}

Author comment

Began life as a copy of #1008937

download  show line numbers  debug dex  old transpilations   

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz

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: 293 / 340
Referenced in: [show references]

Formerly at http://tinybrain.de/1008941 & http://1008941.tinybrain.de