Home
last modified time | relevance | path

Searched refs:substring (Results 1 – 25 of 61) sorted by relevance

123

/arkcompiler/ets_runtime/test/moduletest/stringlocalecompare/
Dstringlocalecompare.js39 { str1: 'appleappleapple'.substring(0, 5), str2: 'appleappleapple'.substring(5, 10) },
40 { str1: 'appleappleapple'.substring(1, 6), str2: 'appleappleapple'.substring(6, 11) },
41 { str1: 'appleappleapple'.substring(0, 5), str2: 'appleappleapple'.substring(10, 15) },
42 { str1: 'appleappleapple'.substring(0, 5), str2: 'appleappleapple'.substring(5, 11) },
54 { str1: 'appleappleapple'.substring(5, 10), str2: 'app'.concat('le') },
55 { str1: 'hello'.concat('world'), str2: 'ohelloworld'.substring(1) },
56 { str1: 'hello'.concat('world'), str2: 'ohelloworld'.substring(2) },
57 { str1: 'appleappleapple'.substring(5, 11), str2: 'app'.concat('le') },
59 { str1: 'apple', str2: 'appleappleapple'.substring(5, 10) },
60 { str1: 'appleappleapple'.substring(0, 5), str2: 'apple' },
[all …]
/arkcompiler/ets_runtime/test/aottest/builtins_string/
Dbuiltins_string.ts27 print(str.substring(0));
29 print(str.substring(-0.01));
31 print(str.substring(0.01));
33 print(str.substring(100));
35 print(str.substring(-100));
37 print(str.substring(10));
39 print(str.substring(-10));
41 print(str.substring(undefined));
43 print(str.substring(num4));
45 print(str.substring(1, 2));
[all …]
/arkcompiler/ets_runtime/test/aottest/string/
Dstring.ts24 let b : string = a.substring(3);
34 let b : string = a.substring(1);
41 let b : string = a.substring(1);
48 var b : string = a.substring(1);
56 let v2 = v1.substring(1, v1);
/arkcompiler/ets_runtime/test/moduletest/string/
Dstring.js29 let str1 = tmp.substring(0, 111) + ',,,,,,,,,,,,,,,,,,,,,,,' + tmp.substring(111 + 23);
30 let str2 = tmp.substring(0, 111) + 'nsExpress3SF#123456789的' + tmp.substring(111 + 23,111 + 24) + '…
31 let str3 = tmp.substring(0, 111) + 'nsExpress3SF#123456789的' + tmp.substring(111 + 23);
38 let utf82 = utf81.substring(0, 169) + '8';
39 let utf83 = utf81.substring(0, 169) + '0';
54 let string2 = string1.substring(1);
64 let str = tmp1.substring(13, 143);
65 let str4 = tmp1.substring(13, 26);
88 let filename1 = name1.substring(0, 14);
93 let filename2 = name2.substring(0, 14);
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/checked/
Dstring_split_test.sts32 assert arr[0].equals("It"): "First substring must be `It`";
33 assert arr[1].equals("can't"): "Second substring must be `can't`";
34 assert arr[2].equals("be"): "Third substring must be `be`";
35 assert arr[3].equals("-"): "Third substring must be `-`";
36 assert arr[4].equals("there"): "Third substring must be `there`";
37 assert arr[5].equals("must"): "Third substring must be `must`";
38 assert arr[6].equals("be"): "Third substring must be `be`";
39 assert arr[7].equals("a"): "Third substring must be `a`";
40 assert arr[8].equals("gap"): "Third substring must be `gap`";
Dets_string_substring.sts42 return str.substring(begin, end);
49 let subs2: String = original.substring(0, original.getLength());
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_test_suite/intrinsics/
Dstring_substring.sts68 let subs: String = golden.substring(i, golden.getLength());
77 let subs: String = golden.substring(0, i);
86 if (golden.substring(-1, 1) == "a") {
89 console.println("substring failed if begin_index < 0");
93 if (golden.substring(str_len_plus_1, 1) == "bcΣΨΩ0123456789!") {
96 console.println("substring failed if (begin_index > str_len || begin_index > end_index");
99 if (golden.substring(0, -1) == "") {
102 console.println("substring failed if end_index < 0");
105 if (golden.substring(0, str_len_plus_1) == golden) {
108 console.println("substring failed if end_index > str_len");
/arkcompiler/ets_runtime/test/aottest/ldobjbyname_typed_path/
Dldobjbyname_typed_path.ts79 print(" - String.prototype.substring: ", strLiteral.substring(7)); // return: 'string literal'
107 substring: function() {
112 print(" - obj.substring: ", obj.substring()); // return: 'obj.substring'
118 arr.substring = function() {
122 print(" - arr.substring: ", arr.substring()); // return: 'arr.substring'
Dexpect_output.txt38 - String.prototype.substring: string literal
52 - obj.substring: obj.substring
54 - arr.substring: arr.substring
/arkcompiler/ets_runtime/test/aottest/module/
Dadd.js22 var a1 = a.substring(4, 28);
31 var a7 = d.toLowerCase() + a1.substring(1);
32 var a8 = a2.toUpperCase() + a3.substring(2);
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_test_suite/strings/
Dstring_api.sts72 assert str3.substring(0).equals("hello" as Object): "Substring from idx 0 must be 'hello'";
73 assert str3.substring(3).equals("lo" as Object): "Substring from idx 3 must be 'lo'";
74 assert str3.substring(0, 3).equals("hel" as Object): "Substring from idx 0 to 3 must be 'hel'";
75 assert str3.substring(1, 3).equals("el" as Object): "Substring from idx 1 to 3 must be 'el'";
76 assert str3.substring(4, 5).equals("o" as Object): "Substring from idx 4 to 5 must be 'o'";
77 …assert str3.substring(4, 4).equals("" as Object): "Substring from idx 4 to 4 must be empty string";
78 assert !str3.substring(3, 5).equals("o" as Object): "Substring from idx 3 to 4 must not be 'o'";
126 assert arr[0].equals("It"): "First substring must be `It`";
127 assert arr[1].equals("can't"): "Second substring must be `can't`";
128 assert arr[2].equals("be"): "Third substring must be `be`";
[all …]
/arkcompiler/ets_runtime/tools/ap_file_viewer/
Dwebpack.config.js74 distPath = path.join(outPath, value.substring(4, value.length + 1));
76 distPath = path.join(outPath, value.substring(7, value.length + 1));
84 distFile = path.join(outPath, value.substring(4, value.length + 1));
86 distFile = path.join(outPath, value.substring(7, value.length + 1));
/arkcompiler/ets_runtime/test/moduletest/stringtrim/
Dstringtrim.js40 let c = a.substring(1, 20);
41 let d = c.substring(2, 20);
/arkcompiler/runtime_core/static_core/tests/vm-benchmarks/examples/benchmarks/js/
DStringTest.js53 return result.substring(this.loops / 2, this.loops);
65 return result.substring(this.loops / 2, this.loops);
/arkcompiler/ets_runtime/tools/circuit_viewer/src/ir/
DLogParser.js77 return [s.substring(0, i), s.substring(i + 1)];
131 let str = l.substring(idx, idx2 + 1);
150 let tmp = ir.MType.substring(p, i);
152 tmp = tmp.substring(2);
155 tmp = tmp.substring(0, tmp.length - 2);
339 let s = l.substring(11);
341 s = s.substring(1);
413 let s = l.substring(11);
415 s = s.substring(1);
/arkcompiler/ets_runtime/test/moduletest/jsonparser/
Djsonparser.js88 const strErr = strData9.substring(0, strData9.length - 2);
96 const strErr2 = strData10.substring(0, strData10.length - 2);
104 const strErr3 = strData11.substring(0, strData11.length - 2);
/arkcompiler/ets_runtime/test/aottest/string_add/
Dstring_add.ts23 var c = a + a.substring(2);
25 a += a.substring(3);
27 a = a + cr.substring(5);
30 var d = cr.substring(1) + a;
/arkcompiler/ets_runtime/ecmascript/intl/
Dlocale_helper.cpp270 std::string substring; in IsStructurallyValidLanguageTag() local
274 substring += *it; in IsStructurallyValidLanguageTag()
277 substring += *it; in IsStructurallyValidLanguageTag()
279 containers.push_back(substring); in IsStructurallyValidLanguageTag()
280 if (!IsVariantSubtag(substring, containers)) { in IsStructurallyValidLanguageTag()
283 substring.clear(); in IsStructurallyValidLanguageTag()
290 bool LocaleHelper::IsVariantSubtag(std::string substring, std::vector<std::string> containers) in IsVariantSubtag() argument
292 if (IsVariantSubtag(substring)) { in IsVariantSubtag()
293 std::transform(substring.begin(), substring.end(), substring.begin(), AsciiAlphaToLower); in IsVariantSubtag()
295 if (std::count(containers.begin(), containers.end(), substring) > INTL_INDEX_TWO) { in IsVariantSubtag()
/arkcompiler/ets_runtime/test/perform/string/
Dexpect_output.txt20 string indexOf input parameter is a substring : 14
21 string indexOf Input parameter is not a substring : 15
26 string substring the first parameter is less than the second parameter : 18
27 string substring the first parameter is greater than the second parameter : 18
28 string substring The first parameter is equal to the second parameter : 11
/arkcompiler/ets_frontend/arkguard/test/grammar/string_validation/
Dstring_substring.ts20 assert(str.substring(1, 4) === 'bcd', 'success');
/arkcompiler/ets_frontend/es2panda/test/parser/ts/
Dtest_satisfies7.ts26 let b = p.b.substring(1);
Dtest_satisfies.ts32 const t5 = (m => m.substring(0)) satisfies T2;
/arkcompiler/runtime_core/static_core/tests/vm-benchmarks/examples/benchmarks/ts/a/1/
Da1.ts54 return result.substring(this.loopCount / 2, this.loopCount);
/arkcompiler/runtime_core/static_core/tests/vm-benchmarks/examples/benchmarks/ts/b/2/
Db2.ts56 return result.substring(this.loopCount / 2, this.loopCount);
/arkcompiler/runtime_core/static_core/plugins/ets/stdlib/std/core/
DString.sts393 * Checks that the substring of this string that starts from
403 * @returns true if the substring begins with prefix
413 * Checks that the substring of this string that starts from
422 * @returns true if the substring begins with prefix
588 * Selects a substring of this String, starting at a specified index
591 * @param begin to start substring
593 * @returns new String which is a substring of this String
595 public substring(begin: int): String {
596 return this.substring(begin, this.getLength());
600 * Selects a substring of this String, starting at a specified index
[all …]

123