List of utility methods to do String Starts Wtih
boolean | startsWith(final String str, final String... prefixes) Nullpointer save version of String.startsWith. if (str == null || prefixes == null) { return false; for (final String prefix : prefixes) { if (str.startsWith(prefix) == true) { return true; return false; |
boolean | startsWith(String baseString, String compareString) startWith if (baseString == null || compareString == null) return false; else return baseString.startsWith(compareString); |
boolean | startsWith(String check, String doesStartWith) starts With return check.startsWith(doesStartWith);
|
boolean | startsWith(String cid1, String cid2) Check if cid1 starts with cid2. if (cid1 == null && cid2 == null) { return true; if (cid1 == null || cid2 == null) { return false; if (cid1.startsWith(cid2) && cid1.charAt(cid2.length()) == '.') { return true; ... |
boolean | startsWith(String comparee, char comparant) starts With if (comparee.length() == 0) return false; return comparee.charAt(0) == comparant; |
boolean | startsWith(String inStart, String inValue) NPE safe String startsWith if (inStart == null && inValue == null) { return true; } else if (inStart == null || inValue == null) { return false; return inValue.startsWith(inStart); |
boolean | startsWith(String n, char tag) starts With return n.charAt(0) == tag;
|
boolean | startsWith(String partial, String possible) starts With return possible.regionMatches(true, 0, partial, 0, partial.length());
|
boolean | startsWith(String path, String prefix) Parts based comparison to make sure that whole parts from path match whole parts from the prefix. String[] pathParts = path.split("\\/"); String[] prefixParts = prefix.split("\\/"); if (pathParts.length < prefixParts.length) return false; for (int i = 0; i < prefixParts.length; i++) { String pathPart = pathParts[i]; String prefixPart = prefixParts[i]; if (!pathPart.equals(prefixPart)) ... |
boolean | startsWith(String prefix, String string, boolean caseInsensitive) Check that string starts with specified prefix. if (caseInsensitive) { int prefixLength = prefix.length(); if (string.length() < prefixLength) { return false; return prefix.equals(string.substring(0, prefixLength).toLowerCase()); } else { return string.startsWith(prefix); ... |