Java String Ends With endsWith(String[] endsWith, String line)

Here you can find the source of endsWith(String[] endsWith, String line)

Description

return true if line ends with something in the array

License

Open Source License

Declaration

static boolean endsWith(String[] endsWith, String line) 

Method Source Code

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

public class Main {
    /**//  w  w  w.j av  a 2s  . c o m
     * return true if line ends with something in the array
     */
    static boolean endsWith(String[] endsWith, String line) {
        for (String s : endsWith) {
            if (line.endsWith(s)) {
                return true;
            }
        }
        return false;
    }
}

Related

  1. endsWith(String string, char character)
  2. endsWith(String string, String... end)
  3. endsWith(String string, String... endsWithText)
  4. endsWith(String value, String[] suffixes)
  5. EndsWith(String x, String z)
  6. endsWith(String[] searchStrings, String text)
  7. endsWith(String[] searchStrings, String text)
  8. endsWith(StringBuffer buf, String s)
  9. endsWith(StringBuffer buffer, String suffix)