Java tutorial
//package com.java2s; public class Main { public static String interceptStrToCity4Tai(String area, String taiStr) { if (area != null && !area.equals("")) { if (area.endsWith(taiStr)) { area = area.substring(0, area.length() - 1); } } return area; } }