Java String Sub String substring(String string, int start, int length)

Here you can find the source of substring(String string, int start, int length)

Description

substring

License

Open Source License

Declaration

public static String substring(String string, int start, int length) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String substring(String string, int start, int length) {
        if (length < 0)
            throw new IndexOutOfBoundsException("Parameter length cannot be negative.");

        return string.substring(start, start + length);
    }//ww w .  j a va  2s. c o m
}

Related

  1. substring(String str, String delim)
  2. subString(String string, int beginIndex, int length)
  3. subString(String string, int index)
  4. substring(String string, int init, int end)
  5. substring(String string, int maxChars, String suffix)
  6. substring(String string, String beginning, String end)
  7. subString(String string, String inizio, String fine)
  8. substring(String subject, int start, int end)
  9. substring(String text, int begin, int end)