Java examples for 2D Graphics:Shape
extract Last Line
//package com.java2s; public class Main { public static String extractLastLine(String input) { int lastIndexOf = input.lastIndexOf('\n'); if (lastIndexOf == -1 || lastIndexOf + 1 > input.length()) return ""; return input.substring(lastIndexOf + 1); }/* w w w . j av a 2s.c o m*/ }