1 | public static string googleMe(string command) |
2 | { |
3 | List<string> word = new List<string>(); |
4 | string url = "https://www.google.com/search?q="; |
5 | |
6 | foreach (string singleWord in command.Split(' ')) |
7 | { |
8 | word.Add(singleWord); |
9 | } |
10 | |
11 | if (word[0].ToLower().Equals("google")) |
12 | { |
13 | for (int i = 1; i < word.Count; i++) |
14 | { |
15 | url += Uri.EscapeDataString(word[i]) + "+"; |
16 | } |
17 | return url; |
18 | |
19 | } |
20 | return ""; |
21 | |
22 | } |
by @awerageguy
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1002054 |
Snippet name: | googleMe (C#) |
Eternal ID of this version: | #1002054/1 |
Text MD5: | 777b0309c628f4873ad8f36f4016cc59 |
Author: | stefan |
Category: | |
Type: | Document |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-12-18 00:41:47 |
Source code size: | 634 bytes / 22 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 593 / 354 |
Referenced in: | [show references] |