Java String Truncate truncateName(String name)

Here you can find the source of truncateName(String name)

Description

truncate Name

License

Open Source License

Declaration

protected static String truncateName(String name) 

Method Source Code

//package com.java2s;

public class Main {
    protected static String truncateName(String name) {
        if (name == null || name.length() <= 12)
            return name;
        else//ww  w  .j a v  a  2 s.c  o m
            return name.substring(0, 12);
    }
}

Related

  1. truncateLeadingSlash(String uri)
  2. truncateLongName(String name, int nameLength)
  3. truncateLongStr(String str)
  4. truncateMessage(String message, int TRUNCATED_MSG_SIZE)
  5. truncateMessageIn50000Characters(final String message)
  6. truncateName(String name)
  7. truncateNicely(String s, int n, String suffix)
  8. truncateNicely(String str, int lower, int upper, String appendToEnd)
  9. truncateNumberSign(String s)