Here you can find the source of substringFromMatch(String match, String string)
public static String substringFromMatch(String match, String string)
//package com.java2s; /******************************************************************************* * Copyright (c) 2007 Bruno Medeiros and other Contributors. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/*from ww w. j a va2s. c o m*/ * Bruno Medeiros - initial implementation *******************************************************************************/ public class Main { /** @return A substring of given string starting from the first occurrence of given match. * Empty string if no match is found. */ public static String substringFromMatch(char match, String string) { int indexOf = string.indexOf(match); return indexOf == -1 ? "" : string.substring(indexOf); } /** @return A substring of given string starting from the first occurrence of given match. * Empty string if no match is found. */ public static String substringFromMatch(String match, String string) { int indexOf = string.indexOf(match); return indexOf == -1 ? "" : string.substring(indexOf); } }