Implementation
Erlang

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating resource.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
import "strings"
b := strings.HasPrefix(s, prefix)
var b = s.startsWith(prefix);
$b = $prefix eq substr($s,0,length($prefix));
b =s.startswith(prefix)
import std.algorithm.searching;
b = s.startsWith(prefix);
boolean b = s.startsWith(prefix);
b := pos(prefix, s) = 1;
import Data.List
b = prefix `isPrefixOf` s
$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
String.starts_with?(s,prefix)
let b = s.starts_with(prefix);
#include <stdbool.h>
#include <string.h>
bool b = !strncmp(s, prefix, sizeof(prefix)-1);