static BigInteger[] extractIntsFromString(S s) { Pattern p = Pattern.compile("-?\\d+"); Matcher m = p.matcher(s); List<BigInteger> list = new ArrayList<BigInteger>(); while (m.find()) list.add(new BigInteger(m.group())); return list.toArray(new BigInteger[list.size()]); }
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: | #1003068 |
Snippet name: | extractIntsFromString |
Eternal ID of this version: | #1003068/1 |
Text MD5: | 1c277c4ad2c16ecac3d19a59ee6833f9 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-04-27 15:52:15 |
Source code size: | 293 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 712 / 681 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1036632 - extractNonNegativeIntsFromString #3000382 - Answer for ferdie (>> t = 1, f = 0) |