Java String Starts Wtih startsWithOneOf(String str, String... strs)

Here you can find the source of startsWithOneOf(String str, String... strs)

Description

starts With One Of

License

Open Source License

Declaration

private static boolean startsWithOneOf(String str, String... strs) 

Method Source Code

//package com.java2s;
// Licensed under the Apache License, Version 2.0 (the "License");

public class Main {
    private static boolean startsWithOneOf(String str, String... strs) {
        for (String t : strs)
            if (str.startsWith(t))
                return true;
        return false;
    }//w w  w. j av a  2  s  . c  om
}

Related

  1. startsWithMultiple(String string, String... starts)
  2. startsWithName(String subject, String beginName)
  3. startsWithNoCase(String csValue, String csStart)
  4. startsWithOne(final String src, final String[] dest)
  5. startsWithOneOf(String source, boolean ignoreCase, String... values)
  6. startsWithOneOf(String string, String... prefixes)
  7. startsWithOrMatches(String s1, String s2)
  8. startsWithPattern(String value, String matchingPatterns)
  9. startsWithPhraseSeparator(char[] token)