Java String Starts Wtih startsWithAt(String text, String toFind, int offset)

Here you can find the source of startsWithAt(String text, String toFind, int offset)

Description

starts With At

License

Open Source License

Declaration

private static boolean startsWithAt(String text, String toFind, int offset) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static boolean startsWithAt(String text, String toFind, int offset) {
        for (int i = 0; i < toFind.length(); i++) {
            if (offset + i >= text.length() || text.charAt(offset + i) != toFind.charAt(i)) {
                return false;
            }//from   w w  w.  j a  v  a2  s  .  c o  m
        }
        return true;
    }
}

Related

  1. startsWithAnyCI(String string, String... prefixes)
  2. startsWithAnyCS(String str, String[] needles)
  3. startsWithAnyIgnoreCase(String s, String... options)
  4. startsWithAnyIgnoreCase(String string, String... searchStrings)
  5. startsWithAnyOfThose(final String in, final String[] prefixes)
  6. startsWithCamelCase(String string, String prefix)
  7. startsWithCapLettersEndsWithDigits(String text)
  8. startsWithChar(CharSequence s, char prefix)
  9. startsWithChar(final String s, final char c)