Libraryless. Click here for Pure Java version (2707L/16K).
1 | sbool eqOptSlash(S a, S b) {
|
2 | int n = lCommonPrefix(a, b); |
3 | int la = l(a), lb = l(b); |
4 | if (n == la && n == lb) true; |
5 | if (n == lb && n == la-1 && lastChar(a) == '/') true; |
6 | if (n == la && n == lb-1 && lastChar(b) == '/') true; |
7 | false; |
8 | } |
Began life as a copy of #1013545
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1030495 |
| Snippet name: | eqOptSlash - eq allowing an optional trailing slash on left or right |
| Eternal ID of this version: | #1030495/1 |
| Text MD5: | ce1168f319b0a532e0d19f03310f2dbb |
| Transpilation MD5: | 64a7ab62a7e42ee32a822d3d303aa5d5 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-12-28 03:43:39 |
| Source code size: | 249 bytes / 8 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 406 / 522 |
| Referenced in: | [show references] |