Here you can find the source of removeGenericQuote(String str)
Parameter | Description |
---|---|
str | a parameter |
public static String removeGenericQuote(String str)
//package com.java2s; //License from project: Apache License public class Main { /**//from w w w. j a v a2s. com * Transform a string from "java.util.List<String>" to * "java.util.List" * * @param str * @return */ public static String removeGenericQuote(String str) { if (str == null) { return null; } // is a generic type if (str.charAt(str.length() - 1) == '>') { int lt = str.lastIndexOf('<'); return str.substring(0, lt); } return str; } }