{"ScriptPreparationCode":"function startsWith(str, a) {\r\n\treturn str.substring(0, a.length) === a\r\n}\r\nfunction startsWith2(str, a) {\r\n\treturn str.indexOf(a) === 0\r\n}","TestCases":[{"Name":"regex","Code":"/^user\\.view:/.test(\u0027user.view:1337\u0027);\r\n/^user\\.list:/.test(\u0027user.view:1337\u0027)","IsDeferred":false},{"Name":"startsWith","Code":"\u0027user.view:1337\u0027.startsWith(\u0027user.view:\u0027)\r\n\u0027user.view:1337\u0027.startsWith(\u0027user.list:\u0027)","IsDeferred":false},{"Name":"custom startsWith","Code":"startsWith(\u0027user.view:1337\u0027, \u0027user.view:\u0027)\r\nstartsWith(\u0027user.view:1337\u0027, \u0027user.list:\u0027)","IsDeferred":false},{"Name":"indexOf","Code":"\u0027user.view:1337\u0027.indexOf(\u0027user.view:\u0027) === 0\r\n\u0027user.view:1337\u0027.indexOf(\u0027user.list:\u0027) === 0","IsDeferred":false},{"Name":"substring","Code":"\u0027user.view:1337\u0027.substring(0, 10) === \u0027user.view:\u0027\r\n\u0027user.view:1337\u0027.substring(0, 10) === \u0027user.view:\u0027","IsDeferred":false},{"Name":"custom startsWith2","Code":"startsWith(\u0027user.view:1337\u0027, \u0027user.view:\u0027)\r\nstartsWith(\u0027user.view:1337\u0027, \u0027user.list:\u0027)","IsDeferred":false}]}