Be concise.
Be useful.
All contributions dictatorially edited by webmasters to match personal tastes.
Please do not paste any copyright violating material.
Please try to avoid dependencies to third-party libraries and frameworks.
var b = s.startsWith(prefix);
B = string:find(S, Prefix) =:= S.
$b = $prefix eq substr($s,0,length($prefix));
b = s.startswith(prefix)
boolean b = s.startsWith(prefix);
b := pos(prefix, s) = 1;
$b = (bool) preg_match('#^http#', $s);
b = s.start_with?(prefix)
var b = s.startsWith(prefix);
var b = (s.lastIndexOf(prefix, 0) === 0);
b = s:find(prefix, 1, true) == 1
String.starts_with?(s,prefix)
let b = s.starts_with(prefix);
bool b = s.StartsWith(prefix);
val b = s.startsWith(prefix)
logical :: b
b = index (string, prefix) == 1
Dim b As Boolean = s.StartsWith(prefix)
val b = s.startsWith(prefix)
function startswith(text, prefix)
return text:find(prefix, 1, true) == 1
end
b = startswith(s, prefix)
prefix([], _) -> true;
prefix([Ch | Rest1], [Ch | Rest2]) ->
prefix(Rest1, Rest2);
prefix(_, _) -> false.
prefix("abc", "abcdef").
b := s beginsWith: prefix
b = string.sub(s, 1, #prefix) == prefix
(defun check-prefix (s prefix)
(cond ((> (length prefix) (length s)) Nil)
( T ( equal prefix (subseq s 0 (length prefix ))))))
(setf b (check-prefix s prefix))