Here you can find the source of removeCommandFromString(String commandString)
public static String removeCommandFromString(String commandString)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Main { public static String removeCommandFromString(String commandString) { String result = new String(); String[] split = commandString.split(" "); List<String> wordList = new ArrayList(Arrays.asList(split)); wordList.remove(0);/*from ww w .java 2s .co m*/ for (String word : wordList) { result += word + " "; } return result; } }