Download Jar. Libraryless. Click here for Pure Java version (7584L/51K).
1 | !7 |
2 | |
3 | p {
|
4 | //mechPlay(); |
5 | |
6 | for (S listName : mechListsPlusNumber("heise.de 2018/04/20 (raw) | Similar lines")) {
|
7 | L<S> items = mechList(listName); |
8 | S prefix = commonPrefixCI(items); |
9 | if (nempty(prefix)) |
10 | mechListAppend(listName + " | Theories", "All lines start with " + quote(prefix)); |
11 | |
12 | S suffix = commonSuffixCI(items); |
13 | if (nempty(suffix)) |
14 | mechListAppend(listName + " | Theories", "All lines end with " + quote(suffix)); |
15 | |
16 | S chars = joinChars(sorted(commonCharactersInStrings(allToUpper(items)))); |
17 | if (nempty(chars)) |
18 | mechListAppend(listName + " | Theories", "All lines contain the characters " + quote(chars) + " (possibly not in order)"); |
19 | |
20 | chars = sortedString(joinChars(charactersAppearingExactlyOnceInEachString(allToUpper(items)))); |
21 | if (nempty(chars)) |
22 | mechListAppend(listName + " | Theories", "All lines contain the characters " + quote(chars) + " exactly once (possibly not in order)"); |
23 | } |
24 | } |
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: | #1014378 |
| Snippet name: | Make theories for similar lines |
| Eternal ID of this version: | #1014378/12 |
| Text MD5: | b2e13a1f8128ae08fe1b34ac8d1cb6fc |
| Transpilation MD5: | 4bb01092cd3946b864167ed13a540288 |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX source code (desktop) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-04-21 13:46:02 |
| Source code size: | 997 bytes / 24 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 645 / 1626 |
| Version history: | 11 change(s) |
| Referenced in: | [show references] |