Libraryless. Click here for Pure Java version (157L/2K/5K).
1 | // Syntax: T x = cast bla; |
2 | // => T x = (T) bla; |
3 | |
4 | !609 |
5 | !596 |
6 | !629 |
7 | |
8 | String s = loadMainJava(); |
9 | |
10 | s = s.replaceAll("(\\w+<[\\w\\s,\\[\\]]+>|\\w+|\\w+\\[\\]|\\w+\\[\\]\\[\\])\\s+(\\w+)\\s*=\\s*cast(\\W[^;]*);", "$1 $2 = ($1) ($3);"); |
11 | |
12 | saveMainJava(s); |
Began life as a copy of #680
download show line numbers debug dex old transpilations
Travelled to 22 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, dhtvkmknsjym, gwrvuhgaqvyk, hxnwyiuffukg, ishqpsrjomds, jlatgrcjtklg, jtubtzbbkimh, liwcxgsjrgqn, lpdgvwnxivlt, mqqgnosmbjvj, mrjhfnjfopze, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1000482 |
Snippet name: | "quickcast" ("cast bla") |
Eternal ID of this version: | #1000482/1 |
Text MD5: | 856dc19df56f59d2289ed0090b24d813 |
Transpilation MD5: | 7885eef8b6a0c0e799131199fc209e18 |
Author: | stefan |
Category: | javax |
Type: | JavaX translator |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-01-21 17:22:41 |
Source code size: | 256 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 795 / 16643 |
Referenced in: | [show references] |