Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I print an array without the first term?
    primarykey
    data
    text
    <p>I'm writing a program to open up links based on a command entered into a console. The command is "/wiki >term array&lt;", and it will open up a web browser with the wiki open and the term array sent through the search function of said wiki. </p> <p>Here is my current code for building the term array to send to the search field:</p> <pre><code>SearchTerm = Arrays.toString(StringTerm).replace("[", "").replace("]", "").replace(",", ""); </code></pre> <p>Now, all that does is get all terms passed the word "/wiki" in my slash command and prints them into a list. It also removes commas and square brackets to make what it prints cleaner.</p> <p>-- I want to add a specific parameter for the first term in the array, so if it is a specific code such as "/wiki wikipedia chickens" is entered, it will send the user to wikipedia with the term "chickens" searched instead of the default wiki with the terms "wikipedia chickens" searched.</p> <p>Using the current code that I have to build the term array I need to use Arrays.toString in order to print the whole array in a readable fashion, but I don't want it to print the first term in the array after it passes through my keyword filter?</p> <p>When I use this code:</p> <pre><code>WIKI_HYPERLINK = WIKI_WIKIPEDIA + StringTerm[1] + StringTerm[2] + StringTerm[3] + StringTerm[4] + StringTerm[5]; </code></pre> <p>It uses array terms 1 - 5, but if there are only 3 entered terms it will throw an error, and if there are more than 5 it will throw an error. </p> <p>So my question is: How do I get a whole array excluding the first term?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload