1 | static S getPluralFromWordHippo(S word) { |
2 | word = toLower(word); |
3 | S html = loadPage("http://www.wordhippo.com/what-is/the-plural-of/" + urlencode(word) + ".html"); |
4 | S pat = "The plural form of " + word + " is <b>"; |
5 | int i = html.indexOf(pat); |
6 | if (i < 0) null; |
7 | i += l(pat); |
8 | int j = indexOf(html, "</b>", i); |
9 | if (j < 0) null; |
10 | ret substring(html, i, j); |
11 | } |
Began life as a copy of #1006545
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: | #1006546 |
Snippet name: | getPluralFromWordHippo - TODO: update |
Eternal ID of this version: | #1006546/3 |
Text MD5: | 11f635d886d752da8c6afd1a3661b50f |
Author: | stefan |
Category: | eleu / nl |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-10-11 22:38:36 |
Source code size: | 376 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 440 / 450 |
Version history: | 2 change(s) |
Referenced in: | [show references] |