リモートで働くプログラマーの検索結果

リモ太がググったことの覚書

javascriptで文字列の前方一致

aruo.net

startsWithがあるらしい

//startswith
var str = 'To be, or not to be, that is the question.';

console.log(str.startsWith('To be'));         // true
console.log(str.startsWith('not to be'));     // false
console.log(str.startsWith('not to be', 10)); // true