Java String Ends With endsWith(int[] data, int[] ends)

Here you can find the source of endsWith(int[] data, int[] ends)

Description

ends With

License

Open Source License

Declaration

public static final boolean endsWith(int[] data, int[] ends) 

Method Source Code

//package com.java2s;

public class Main {

    public static final boolean endsWith(int[] data, int[] ends) {
        if (data == null || ends == null) {
            return false;
        }//from  w w  w. j  a  va 2  s . c o m

        if (data.length < ends.length) {
            return false;
        }

        int start = data.length - ends.length;
        for (int i = 0; i < ends.length; i++) {
            if (data[start + i] != ends[i]) {
                return false;
            }
        }

        return true;
    }
}

Related

  1. endsWith(final String src, final String... suffixes)
  2. endsWith(final String str, final char suffix)
  3. endsWith(final String str, final String... suffixes)
  4. endsWith(final String string, final String[] suffixes)
  5. endsWith(final StringBuilder builder, final char match)
  6. endsWith(String a, char[] b)
  7. endsWith(String baseString, String compareString)
  8. endsWith(String filePath, String extension)
  9. endsWith(String fullString, String subString)