Java String Starts Wtih startsWithOne(final String src, final String[] dest)

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

Description

starts With One

License

Open Source License

Declaration

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

Method Source Code

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

public class Main {
    public static int startsWithOne(final String src, final String[] dest) {
        for (int i = 0; i < dest.length; ++i) {
            final String m = dest[i];
            if (m != null) {
                if (src.startsWith(m)) {
                    return i;
                }//from www  .ja  va2 s.c  om
            }
        }
        return -1;
    }
}

Related

  1. startsWithLowerCase(String text)
  2. startsWithLowerCaseChar(String s)
  3. startsWithMultiple(String string, String... starts)
  4. startsWithName(String subject, String beginName)
  5. startsWithNoCase(String csValue, String csStart)
  6. startsWithOneOf(String source, boolean ignoreCase, String... values)
  7. startsWithOneOf(String str, String... strs)
  8. startsWithOneOf(String string, String... prefixes)
  9. startsWithOrMatches(String s1, String s2)