Here you can find the source of startsWith(final String str, final String... prefixes)
public static boolean startsWith(final String str, final String... prefixes)
//package com.java2s; // ProjectForge is dual-licensed. public class Main { /**//from w w w . j ava 2 s. co m * Nullpointer save version of String.startsWith. * @return True, if the given string starts with one of the given prefixes, otherwise false. * @see String#startsWith(String) */ public static boolean startsWith(final String str, final String... prefixes) { if (str == null || prefixes == null) { return false; } for (final String prefix : prefixes) { if (str.startsWith(prefix) == true) { return true; } } return false; } }