Libraryless. Click here for Pure Java version (2482L/16K).
1 | static int charToIntOrMinus1(Char c) {
|
2 | ret c == null ? -1 : (int) c; |
3 | } |
4 | |
5 | static int charToIntOrMinus1(CharSequence s) {
|
6 | ret empty(s) ? -1 : (int) s.charAt(0); |
7 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1029207 |
| Snippet name: | charToIntOrMinus1 |
| Eternal ID of this version: | #1029207/3 |
| Text MD5: | 2a1ba1f6bd7e7ae79589d7287a45e477 |
| Transpilation MD5: | 7b0d63559d5af770e0405a11593e3aa0 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-07-25 12:57:08 |
| Source code size: | 169 bytes / 7 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 458 / 609 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |