Here you can find the source of sanitizeTag(String s)
public static String sanitizeTag(String s)
//package com.java2s; //License from project: Apache License public class Main { public static final int MAX_TAG_LENGTH = 55; public static String sanitizeTag(String s) { // if > 55 chars, assume max entropy is at the end (like a class name). if (s.length() > MAX_TAG_LENGTH) { s = s.substring(s.length() - MAX_TAG_LENGTH); }//from w w w.j av a 2s. co m return s; } }