Android String Sub String Get deleteLast(String str, int num)

Here you can find the source of deleteLast(String str, int num)

Description

delete Last

License

Apache License

Declaration

public static final String deleteLast(String str, int num) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static final String deleteLast(String str, int num) {
        if (str == null)
            return null;
        return str.substring(0, str.length() - num);
    }//from ww w .j  a va 2  s.  c  om
}

Related

  1. left(String str, int length)
  2. right(String str, int length)
  3. delSuffix(String str)
  4. deleteLastIf(String str, String eq_str)
  5. getTailorString(String string, int length)
  6. mid(String str, int beginIndex, int length)
  7. subStringByByte(String str, int startPos, int length)