{"ScriptPreparationCode":"function localeCompare(a, b) {\r\n return a.localeCompare(b);\r\n}\r\n\r\nfunction compare(a, b) {\r\n const aLength = a.length;\r\n const bLength = b.length;\r\n for (let i = 0; i \u003C bLength; \u002B\u002Bi) {\r\n let code = a.charCodeAt(i);\r\n if (isNaN(code)) {\r\n // b startsWith a\r\n return -1;\r\n }\r\n code -= b.charCodeAt(i);\r\n if (code)\r\n return code;\r\n }\r\n // a startsWith b\r\n return aLength \u003E bLength ? 1 : 0;\r\n}","TestCases":[{"Name":"localeCompare","Code":"localeCompare(\u0022radiogQe8_7yhdY4Cl1QQSAsEJocXvTjlCzDN\u0022, \u0022radioradioAu5NNprfgPH94MDcxL-rElEcHDvmG\u0022);","IsDeferred":false},{"Name":"compare","Code":"compare(\u0022radiogQe8_7yhdY4Cl1QQSAsEJocXvTjlCzDN\u0022, \u0022radioradioAu5NNprfgPH94MDcxL-rElEcHDvmG\u0022);","IsDeferred":false}]}