Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

22
LINES

< > BotCompany Repo | #1002057 // googleMe function - JavaX auto-conversion from C#

JavaX fragment (include)

public static String googleMe(String command)
        {
            List<String> word = new ArrayList<String>();
            String url = "https://www.google.com/search?q=";

            for (String singleWord : command.split(" "))
            {
                word.add(singleWord);
            }

            if (word.get(0).toLowerCase().equals("google"))
            {
                for (int i = 1; i < word.size(); i++)
                {
                    url += urlencode(word.get(i)) + "+";
                }
                return url;
                
            }
            return "";
 
          }

Author comment

Translator: #1002056, C# Original: #1002054

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: 646 / 1056
Referenced in: #1002059 - Google Me & Bing Me Bot
#1002060 - bingMe function
#1002094 - Find relevant
#3000188 - Answer for stefanreich(>> t search)
#3000202 - Answer for stefanreich (>> T conversion bot)
#3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)