1 | public static String googleMe(String command) |
2 | {
|
3 | List<String> word = new ArrayList<String>(); |
4 | String url = "https://www.google.com/search?q="; |
5 | |
6 | for (String singleWord : command.split(" "))
|
7 | {
|
8 | word.add(singleWord); |
9 | } |
10 | |
11 | if (word.get(0).toLowerCase().equals("google"))
|
12 | {
|
13 | for (int i = 1; i < word.size(); i++) |
14 | {
|
15 | url += urlencode(word.get(i)) + "+"; |
16 | } |
17 | return url; |
18 | |
19 | } |
20 | return ""; |
21 | |
22 | } |
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: | #1002057 |
| Snippet name: | googleMe function - JavaX auto-conversion from C# |
| Eternal ID of this version: | #1002057/1 |
| Text MD5: | 6478682c1c8b51bc707737441c0e1b39 |
| Author: | stefan |
| Category: | |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2015-12-18 00:43:17 |
| Source code size: | 636 bytes / 22 lines |
| Pitched / IR pitched: | No / Yes |
| Views / Downloads: | 870 / 1287 |
| Referenced in: | [show references] |