Java String Ends With endsWithOne(final String src, final String[] dest)

Here you can find the source of endsWithOne(final String src, final String[] dest)

Description

ends With One

License

Open Source License

Declaration

public static int endsWithOne(final String src, final String[] dest) 

Method Source Code

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

public class Main {
    public static int endsWithOne(final String src, final String[] dest) {
        for (int i = 0; i < dest.length; ++i) {
            final String m = dest[i];
            if (m != null) {
                if (src.endsWith(m)) {
                    return i;
                }//from ww  w.  ja  v  a 2s.  c o  m
            }
        }
        return -1;
    }
}

Related

  1. endsWithIllegalWindowsChar(String filename)
  2. endsWithIndex(String[] suffixes, String propertyName)
  3. endsWithLineSeparator(final CharSequence msg)
  4. endsWithName(String subject, String endName)
  5. endsWithNewline(String string)
  6. endsWithOne(String src, String... dest)
  7. endsWithOneOf(String value, String... ends)
  8. endsWithoutPathSeparator(final String path)
  9. endsWithoutSlash(String url)