forked from chakra-core/ChakraCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubstring.js
More file actions
38 lines (33 loc) · 1.02 KB
/
substring.js
File metadata and controls
38 lines (33 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
function test(v)
{
v = v.substring(7,15);
switch (v)
{
case "string0s":
WScript.Echo("string0s");
break;
case "string1s":
WScript.Echo("string1s");
break;
case "string2s":
WScript.Echo("string2s");
break;
case "string3s":
WScript.Echo("string3s");
break;
case "string4s":
WScript.Echo("string4s");
break;
default:
WScript.Echo("ERROR: " + v);
break;
};
}
for (var i = 0; i < 5; i++)
{
test("prefix_string" + i + "suffix");
}