deno.land / x / masx200_leetcode_test@10.6.5 / check-if-string-is-a-prefix-of-array / index.ts
123456789101112export default function isPrefixString(s: string, words: string[]): boolean { for (const word of words) { if (s.startsWith(word)) { s = s.slice(word.length); if (s.length === 0) return true; } else { return false; } } return false;}
Version Info