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

12
LINES

< > BotCompany Repo | #1000482 // "quickcast" ("cast bla")

JavaX translator [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (157L/2K/5K).

// Syntax: T x = cast bla;
// => T x = (T) bla;

!609

!596

!629

String s = loadMainJava();

s = s.replaceAll("(\\w+<[\\w\\s,\\[\\]]+>|\\w+|\\w+\\[\\]|\\w+\\[\\]\\[\\])\\s+(\\w+)\\s*=\\s*cast(\\W[^;]*);", "$1 $2 = ($1) ($3);");

saveMainJava(s);

Author comment

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: 794 / 16642
Referenced in: #636 - Resolve symbolic translator invocations
#720 - IOIOI Processor (v14, changing examples to Object)
#1000634 - Spike - find table names in MySQL dump
#1000642 - Find create statements in MySQL dump
#1000648 - Find field names in MySQL "create table"
#1003874 - Backup of #759 Before Integration
#3000189 - Answer for stefanreich(>> t bla)
#3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)