Java String Tail tailOf(String s, char separator)

Here you can find the source of tailOf(String s, char separator)

Description

tail Of

License

Open Source License

Declaration

public static String tailOf(String s, char separator) 

Method Source Code

//package com.java2s;
/*//from   www.  j a  v  a2  s  .c  o m
 * Copyright (c) 1998 - 2005 Versant Corporation
 * 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:
 * Versant Corporation - initial API and implementation
 */

public class Main {
    public static String tailOf(String s, char separator) {
        int index = s.indexOf(separator);
        if (index < 0)
            return "";
        return s.substring(index + 1);
    }
}

Related

  1. tail(final String text, final char ch)
  2. tail(String s, char ch)
  3. tail(String s, String separator)
  4. tail(String src, String dividerRegex)
  5. tail(String text, String separator)
  6. tailOfString(String input, String sub)