Java String Starts Wtih startsWith(String str, String mark, int paramInt)

Here you can find the source of startsWith(String str, String mark, int paramInt)

Description

starts With

License

Apache License

Declaration

private static boolean startsWith(String str, String mark, int paramInt) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    private static boolean startsWith(String str, String mark, int paramInt) {
        char[] value = str.toCharArray();
        if ((paramInt < 0) || paramInt > value.length) {
            return false;
        }/* ww  w .  j  ava  2 s  . com*/
        int k = mark.length();
        char[] chars = mark.toCharArray();
        while (--k >= 0) {
            if (value[paramInt + k] != chars[k]) {
                return false;
            }
        }
        return true;
    }
}

Related

  1. startsWith(String self, String pattern)
  2. startsWith(String source, String target, boolean caseSensitive)
  3. startsWith(String str, char c)
  4. startsWith(String str, char prefix)
  5. startsWith(String str, char prefix)
  6. startsWith(String str, String prefix)
  7. startsWith(String str, String prefix)
  8. startsWith(String str, String prefix)
  9. StartsWith(String str, String prefix)