Java Utililty Methods String Starts Wtih

List of utility methods to do String Starts Wtih

Description

The list of methods to do String Starts Wtih are organized into topic(s).

Method

booleanstartsWithLetterOrUnderscore(String value)
starts With Letter Or Underscore
if (isEmpty(value)) {
    return false;
char character = value.charAt(0);
return character == '_' || Character.isLetter(character);
booleanstartsWithLinuxRoot(String path)
Checks if the provide path starts with a valid Linux root, that is "/".
return path != null && path.startsWith("/");
booleanstartsWithLowerCase(String text)
starts With Lower Case
if (text == null || text.length() == 0 || !Character.isLowerCase(text.charAt(0))) {
    return false;
return true;
booleanstartsWithLowerCaseChar(String s)
Checks if a string starts with lower case char.
int c0 = (int) s.charAt(0);
return (c0 >= 97 && c0 <= 122) ? true : false;
booleanstartsWithMultiple(String string, String... starts)
Checks if the input string starts with any of the values.
for (String start : starts) {
    if (string.startsWith(start)) {
        return true;
return false;
booleanstartsWithName(String subject, String beginName)
starts With Name
if (!subject.startsWith(beginName)) {
    return false;
if (beginName.length() == 0) {
    return true;
if (subject.length() == beginName.length()) {
    return true;
...
booleanstartsWithNoCase(String csValue, String csStart)
starts With No Case
csValue = csValue.toUpperCase();
csStart = csStart.toUpperCase();
return csValue.startsWith(csStart);
intstartsWithOne(final String src, final String[] dest)
starts With One
for (int i = 0; i < dest.length; ++i) {
    final String m = dest[i];
    if (m != null) {
        if (src.startsWith(m)) {
            return i;
return -1;
booleanstartsWithOneOf(String source, boolean ignoreCase, String... values)
Determine whether the specified source string starts with one of the specified values.
if ((source == null) || (values == null))
    return false;
String s = ignoreCase ? source.toLowerCase() : source;
for (String val : values) {
    if (val == null)
        continue;
    String s2 = ignoreCase ? val.toLowerCase() : val;
    if (s.startsWith(s2))
...
booleanstartsWithOneOf(String str, String... strs)
starts With One Of
for (String t : strs)
    if (str.startsWith(t))
        return true;
return false;