Here you can find the source of startsWithAny(String text, String... prefixes)
Parameter | Description |
---|---|
text | a parameter |
prefixes | a parameter |
public static boolean startsWithAny(String text, String... prefixes)
//package com.java2s; /**/*from w ww .ja v a 2 s.c o m*/ * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ public class Main { /** * Return whether the non-null text arg starts with any of the prefix * values. * * @param text * @param prefixes * @return boolean */ public static boolean startsWithAny(String text, String... prefixes) { for (String prefix : prefixes) { if (text.startsWith(prefix)) { return true; } } return false; } }