True if string starts with prefix
@static
@param {String} str string to check for start
@param {String} prefix start value
@returns {Boolean} true if str starts with prefix
@memberOf module:Strings
496886
function(str, start) {
    return (str.length >= start.length &&
            str.substr(0, start.length) === start);
  }
494057
private void checkPrefix(String prefix) {
    if (prefix.length() > 0) {
      // Make sure that prefix starts with a legal character.
      if (!contains(firstChars, prefix.charAt(0))) {
        char[] chars = new char[firstChars.length];
        for (int i = 0; i < chars.length; i++) {
          chars[i] = firstChars[i].name;
        }
        throw new IllegalArgumentException(
            "prefix must start with one of: " + Arrays.toString(chars));
      }
      for (int pos = 1; pos < prefix.length(); ++pos) {
        char[] chars = new char[nonFirstChars.length];
        for (int i = 0; i < chars.length; i++) {
          chars[i] = nonFirstChars[i].name;
        }
        if (!contains(nonFirstChars, prefix.charAt(pos))) {
          throw new IllegalArgumentException(
              "prefix has invalid characters, must be one of: "
              + Arrays.toString(chars));
        }
      }
    }
  }
343169
public boolean startsWith(final String str) {
        if (str == null) {
            return false;
        }
        final int len = str.length();
        if (len == 0) {
            return true;
        }
        if (len > size) {
            return false;
        }
        for (int i = 0; i < len; i++) {
            if (buffer[i] != str.charAt(i)) {
                return false;
            }
        }
        return true;
    }
133036
def _startswith(expr, pat):
    

    return _string_op(expr, Startswith, output_type=types.boolean, _pat=pat)
900464
function removePrefix(str, prefixToken) {
  const index =  str.indexOf(prefixToken);

  if (index > -1) {
    str = str.substr(index + prefixToken.length).trim();
  }
  return str;
}
944685
function (str) {
      var strlen = str.length;
      if (this.html.substr(this.currentChar, strlen).toLowerCase() === str.toLowerCase()) {
        this.currentChar += strlen;
        return true;
      }
      return false;
    }
1263940
static boolean hasAnyPrefix(@Nullable String number, @NonNull String... prefixes) {
        if (number == null) {
            return false;
        }

        for (String prefix : prefixes) {
            if (number.startsWith(prefix)) {
                return true;
            }
        }
        return false;
    }
984207
public static boolean startsWithAny(String _str, String... _startStrings) {
        if (_str == null || _startStrings == null || _startStrings.length == 0) {
            return false;
        }

        for (String start : _startStrings) {
            if (_str.startsWith(start)) {
                return true;
            }
        }

        return false;
    }
1279156
def is_prefix(pre_path, path):
    """"""
    pre_path = pre_path.strip('.')
    path = path.strip('.')
    return not pre_path or path.startswith(pre_path + '.')
1189784
private static String prefix(String s, int start) {
        StringBuilder prefix=new StringBuilder(MAX_PREFIX_LENGTH+20);
        if(start==0) {
            prefix.append("\"");
        } else {
            prefix.append("[at pattern index ").append(start).append("] \"");
        }
        int substringLength=s.length()-start;
        if(substringLength<=MAX_PREFIX_LENGTH) {
            prefix.append(start==0 ? s : s.substring(start));
        } else {
            int limit=start+MAX_PREFIX_LENGTH-4;
            if(Character.isHighSurrogate(s.charAt(limit-1))) {
                // remove lead surrogate from the end of the prefix
                --limit;
            }
            prefix.append(s, start, limit).append(" ...");
        }
        return prefix.append("\"").toString();
    }
1077860
public static boolean startsWithIgnoreCase(final String str, final String prefix, final int offset) {
        
        if (str == null || prefix == null) {
            return (str == null && prefix == null);
        }
        
        if(str.length() < offset) {
            return false;
        }
        
        final String subStr = str.substring(offset);
        return startsWithIgnoreCase(subStr, prefix);
        
    }
1178873
public static boolean startsWith( String text , String prefix , int offset , boolean ignoreCase )
    {
        if (ignoreCase)
            return startsWithIgnoreCase(text,prefix,offset);
        else
            return text.startsWith(prefix,offset);
    }
398002
function convertPrefix(str) {
    var res = new Array(str.length);
    for (var i = 0; i < str.length; ++i)
        res[i] = str[i] === '1';
    return res;
}
1183156
public static function startsWith($string, $prefix, $ignoreCase = false)
    {
        if ($ignoreCase) {
            $string = strtolower($string);
            $prefix = strtolower($prefix);
        }

        return $prefix == substr($string, 0, strlen($prefix));
    }
492972
static Shortcode parseStart(final String str) throws ParseException {
      String exp = str.trim();

      if(exp.length() < 3) {
         throw new ParseException(String.format("Invalid shortcode ('%s')", str), 0);
      }

      if(exp.charAt(0) != '[') {
         throw new ParseException("Expecting '['", 0);
      }

      if(exp.charAt(exp.length() - 1) != ']') {
         throw new ParseException("Expecting ']'", exp.length() - 1);
      }

      exp = exp.substring(1, exp.length() - 1).trim();

      if(exp.length() == 0) {
         throw new ParseException(String.format("Invalid shortcode ('%s')", str), 0);
      }

      int attrStart = exp.indexOf(' ');
      if(attrStart < 0) {
         return new Shortcode(validateName(exp), ImmutableMap.of());
      } else {
         return new Shortcode(validateName(exp.substring(0, attrStart)), parseAttributes(exp.substring(attrStart).trim()));
      }
   }
947828
private static boolean startsWith(String str, String... prefixes) {
        for (String prefix : prefixes) {
            if (str.startsWith(prefix)) return true;
        }
        return false;
    }
1276576
public static final Function<String, Boolean> startsWith(final String prefix, final int offset) {
        return new StartsWith(prefix, offset);
    }