Java String Sub String substrings(String str, int start, int end)

Here you can find the source of substrings(String str, int start, int end)

Description

substrings

License

Open Source License

Declaration

public static String substrings(String str, int start, int end) 

Method Source Code

//package com.java2s;

public class Main {

    public static String substrings(String str, int start, int end) {
        if (str == null) {
            return null;
        }/*from w  w w  .  jav a2  s .co m*/

        int length = end - start;
        byte[] dest = new byte[length];
        System.arraycopy(str.getBytes(), start, dest, 0, length);
        return new String(dest);
    }
}

Related

  1. substringMatches(final String source, final String substring, final boolean checkBoundaries)
  2. substringMore(String s, int maxlen)
  3. subStringNobit(String str, int toCount, String more)
  4. subStringNotEncode(String subject, int size)
  5. subStringRight(String str, int length)
  6. subStrings(String str1, String str2)
  7. substrings(String[] arr, int start, int end)
  8. subStringToInteger(String src, String start, String to)
  9. substringToLast(final String str, final String separator)