Libraryless. Click here for Pure Java version (2395L/17K/53K).
1 | !752 |
2 | |
3 | p { |
4 | makeBot("Get Text Bot."); |
5 | askMyself(loadSnippet("#1001791")); |
6 | } |
7 | |
8 | static S answer(S s) { |
9 | new Matches m; |
10 | if (matchStart("get", s, m)) { |
11 | //print("Get! rest: " + quote(m.rest())); |
12 | ret get(m.rest()); |
13 | } |
14 | ret null; |
15 | } |
16 | |
17 | static S get(S s) { |
18 | new Matches m; |
19 | |
20 | if (match3("transpilation of *", s, m)) { |
21 | S snippetID = m.unq(0); |
22 | ret dropFirstLine(getServerTranspiled(snippetID)); |
23 | } |
24 | |
25 | if (matchStart("line * of", s, m)) { |
26 | S text = get(m.rest()); |
27 | int lineNr = parseInt(m.unq(0)); |
28 | ret getLine(text, lineNr); |
29 | } |
30 | ret null; |
31 | } |
32 | |
33 | !include #1000619 // get |
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1001794 |
Snippet name: | Command processor experiment |
Eternal ID of this version: | #1001794/1 |
Text MD5: | 0a568a556eb9a990d68d718dae07ce49 |
Transpilation MD5: | 48e2dc985f69af003c5bdafda1b95f36 |
Author: | stefan |
Category: | |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-07-28 15:12:31 |
Source code size: | 628 bytes / 33 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 613 / 660 |
Referenced in: | [show references] |