Here you can find the source of suffix(String input, char delimiter)
Parameter | Description |
---|---|
input | a parameter |
delimiter | a parameter |
public static String suffix(String input, char delimiter)
//package com.java2s; // This package is part of the Spiralcraft project and is licensed under public class Main { /**// ww w .ja v a 2s. c o m * Return the remainder of the string after the last occurrence of the * delimiter char * * @param input * @param delimiter * @return */ public static String suffix(String input, char delimiter) { if (input == null) { return null; } int pos = input.lastIndexOf(delimiter); if (pos >= 0) { if (input.length() > pos + 1) { return input.substring(pos + 1); } else { return ""; } } return null; } }