Java String Tail tail(final String text, final char ch)

Here you can find the source of tail(final String text, final char ch)

Description

tail

License

Open Source License

Declaration

private static String tail(final String text, final char ch) 

Method Source Code

//package com.java2s;
/*//from   w  w w .  java  2 s .  c o m
 * Copyright (c) 2014 Stephan D. Cote' - All rights reserved.
 * 
 * This program and the accompanying materials are made available under the 
 * terms of the MIT License which accompanies this distribution, and is 
 * available at http://creativecommons.org/licenses/MIT/
 *
 * Contributors:
 *   Stephan D. Cote 
 *      - Initial concept and implementation
 */

public class Main {
    private static String tail(final String text, final char ch) {
        final int indx = text.lastIndexOf(ch);
        return (indx != -1) ? text.substring(indx + 1) : text;
    }
}

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)