Home
last modified time | relevance | path

Searched full:str (Results 1 – 25 of 2750) sorted by relevance

12345678910>>...110

/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/07.expressions/01.evaluation_of_expressions/03.operator_precedence/
Dtypeof.sts23 let str: string = ""
28 str = typeof num++
29 if (str != "number" || num != 2.0) return 1;
30 str = ""
32 str = typeof num--
33 if (str != "number" || num != 1.0) return 1;
34 str = ""
36 str = typeof typeof num++
37 if (str != "string" || num != 2.0) return 1;
38 str = ""
[all …]
/arkcompiler/ets_runtime/test/aottest/builtins_string/
Dbuiltins_string.ts25 let str = "sd-93u498thikefnow8y3-0rh1nalksfnwo8y3t19-3r8hoiefnw";
27 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));
[all …]
/arkcompiler/ets_runtime/ecmascript/tests/
Djs_date_test.cpp69 CString str = "2020-11-19T12:18:18.132Z"; in HWTEST_F_L0() local
70 JSTaggedValue ms = ecmascript::JSDate::GetTimeFromString(str.c_str(), str.length()); in HWTEST_F_L0()
73 str = "1880-12-30T23:59:59"; in HWTEST_F_L0()
74 ms = ecmascript::JSDate::GetTimeFromString(str.c_str(), str.length()); in HWTEST_F_L0()
77 str = "2020-11-19Z"; in HWTEST_F_L0()
78 ms = ecmascript::JSDate::GetTimeFromString(str.c_str(), str.length()); in HWTEST_F_L0()
81 str = "2020-11"; in HWTEST_F_L0()
82 ms = ecmascript::JSDate::GetTimeFromString(str.c_str(), str.length()); in HWTEST_F_L0()
85 str = "2023-1-11"; in HWTEST_F_L0()
86 ms = ecmascript::JSDate::GetTimeFromString(str.c_str(), str.length()); in HWTEST_F_L0()
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/03.types/08.reference_types/04.literal_types/
Dfunction_literal_type.params.yaml21 function foo(i: "some str") { }
23 let a: "another str" = "another str"
31 function foo(i: "some str") { }
33 foo(new string("some str"))
38 function foo(i: "some str", j: null, k: undefined) {
39 assertEQ( i, "some str")
44 foo("some str", null, undefined)
50 assertEQ( i, "some str")
55 foo("some str", null, undefined)
56 let a: string = "some str"
[all …]
Dcustom_literal_type.params.yaml19 type LITERAL = "some str"
21 let a: LITERAL = "some str"
22 assertTrue( a instanceof "some str" )
24 assertEQ( a, "some str" )
30 let a: "some str" | "another str" | Number | boolean | string = "some str"
31 assertEQ( a, "some str" )
32 a = "another str"
33 assertEQ( a, "another str" )
36 a = "str"
37 assertEQ( a, "str" )
[all …]
Dclass_literal_type.params.yaml20 i: "some str" = "some str"
26 assertEQ( a.i, "some str" )
34 i: "some str"
39 this.i = "some str"
46 assertEQ( a.i, "some str" )
54 i: "some str"
59 this.i = "some str"
64 constructor(i: "some str", j: undefined, k: null) {
71 let i: "some str" = "some str"
75 assertEQ( b.i, "some str" )
[all …]
/arkcompiler/ets_runtime/test/aottest/exception_case14/
Dexception_case14.js39 var alphabet, cc, caseChanged, ee, i, isNum, length, str,
70 str = String(vv);
73 if (!isNumeric.test(str = String(vv))) return parseNumeric(xx, str, isNum);
75 xx.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1;
77 if ((ee = str.indexOf('.')) > -1) str = str.replace('.', '');
78 if ((i = str.search(/ee/i)) > 0) {
80 ee += +str.slice(i + 1);
81 str = str.substring(0, i);
83 ee = str.length;
92 str = String(vv);
[all …]
/arkcompiler/runtime_core/static_core/tests/tests-u-runner/runner/enum_types/
Dparams.py35 cmd_prefix: List[str]
36 cmd_env: Dict[str, str]
41 es2panda: str
42 es2panda_args: List[str]
45 runtime: str
46 runtime_args: List[str]
49 ark_aot: Optional[str]
50 aot_args: List[str]
53 ark_quick: str
54 quick_args: List[str]
[all …]
/arkcompiler/toolchain/websocket/
Dstring_utils.h25 inline void TrimLeft(std::string &str) in TrimLeft() argument
27str.erase(str.begin(), std::find_if(str.begin(), str.end(), [](unsigned char ch) { return !std::is… in TrimLeft()
30 inline void TrimRight(std::string &str) in TrimRight() argument
32str.erase(std::find_if(str.rbegin(), str.rend(), [](unsigned char ch) { return !std::isspace(ch); … in TrimRight()
33 str.end()); in TrimRight()
36 inline void Trim(std::string &str) in Trim() argument
38 TrimLeft(str); in Trim()
39 TrimRight(str); in Trim()
42 inline void ToLowerCase(std::string& str) in ToLowerCase() argument
44 …std::transform(str.begin(), str.end(), str.begin(), [](unsigned char c) { return std::tolower(c); … in ToLowerCase()
/arkcompiler/runtime_core/static_core/tests/tests-u-runner/runner/
Dchapters.py30 name: str
31 includes: List[str]
32 excludes: List[str]
36 def __init__(self, chapters_name: str) -> None: argument
42 def __init__(self, item: str) -> None: argument
51 def __init__(self, chapters_file: str): argument
56 def __parse(chapters_file: str) -> Dict[str, Chapter]: argument
57 result: Dict[str, Chapter] = {}
58 yaml_header: Dict[str, Any] = YamlDocument.load(chapters_file)
78 def __parse_item(includes: List[str], excludes: List[str], yaml_item: Union[str, dict]) -> None: argument
[all …]
Dutils.py43 def download(name: str, git_url: str, revision: str, target_path: str, show_progress: bool = False)… argument
69 ProcessCopy = Callable[[str, str], None]
72 def generate(name: str, url: str, revision: str, generated_root: Path, *, argument
73 … stamp_name: Optional[str] = None, test_subdir: str = "test", show_progress: bool = False, argument
74 process_copy: Optional[ProcessCopy] = None, force_download: bool = False) -> str:
106 def copy(source_path: Union[Path, str], dest_path: Union[Path, str], remove_if_exist: bool = True) … argument
115 Log.exception_and_raise(_LOGGER, str(ex))
118 def read_file(file_path: Union[Path, str]) -> str: argument
124 def write_2_file(file_path: Union[Path, str], content: str) -> None: argument
134 def purify(line: str) -> str: argument
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_test_suite/strings/
Dstring_compare_to.sts30 [ "A", "A", 0 ], // same str latin -> EQ
35 [ "AAA", "AAA", 0 ], // same 3c str -> EQ
36 [ "AAAA", "AAAA", 0 ], // same 4c str -> EQ
37 [ "AAAX", "AAAA", 1 ], // different 4c str -> GT
38 [ "AAAA", "AAAX", -1], // different 4c str -> LT
41 [ "AAAAX", "AAAAX", 0 ], // same 5c str -> EQ
42 [ "AAAAA", "AAAAX", -1], // same 5c str -> LT
43 [ "AAAAX", "AAAAA", 1 ], // same 5c str -> EQ
44 [ "AAAAX", "AAAAAAA", 1 ], // different str -> GT
45 [ "AAAAAAA", "AAAAX", -1 ], // different str -> LT
[all …]
/arkcompiler/ets_frontend/es2panda/test/parser/ts/inline-property/
Dinline-property4-expected.txt7 lda.str str1
9 lda.str str2
15 lda.str str_prop
17 lda.str str3
21 lda.str str5
25 lda.str str6
41 lda.str str4
43 lda.str computed2
45 lda.str str5
47 lda.str
[all …]
/arkcompiler/runtime_core/panda_guard/util/
Dstring_util.cpp31 std::vector<std::string> panda::guard::StringUtil::Split(const std::string &str, const std::string … in Split() argument
34 auto start = str.find_first_not_of(delimiter, 0); in Split()
35 auto pos = str.find_first_of(delimiter, 0); in Split()
38 tokens.push_back(str.substr(start, pos - start)); in Split()
40 start = str.find_first_not_of(delimiter, pos); in Split()
41 pos = str.find_first_of(delimiter, start + 1); in Split()
47 std::vector<std::string> panda::guard::StringUtil::StrictSplit(const std::string &str, const std::s… in StrictSplit() argument
52 while (start <= str.size()) { in StrictSplit()
53 end = str.find_first_of(delimiter, start); in StrictSplit()
55 end = str.size(); in StrictSplit()
[all …]
/arkcompiler/ets_runtime/test/perform/string/
Dstring.js17 … const str = "The quick brown fox jumps over the lazy dog. If the dog reacted, was it really lazy?" constant
20 str.replace(/dog/g, 'monkey');
30 const str = 'Apples are round, and apples are juicy.'; constant
33 str.replace(re, 'Christmas');
54 const str = "Hello World. How are you doing?" constant
57 str.split(" ", 3);
65 const str = "The quick brown fox jumps over the lazy dog." constant
68 str.split(" ");
76 const str = "Harry Trump ;Fred Barney; Helen Rigby ; Bill Abel ;Chris Hand " constant
80 str.split(re);
[all …]
/arkcompiler/ets_frontend/es2panda/test/optimizer/ts/branch-elimination/projects/ts_ohmurl_project/
Dtest-import-exec-expected.pa.txt6 lda.str bundle
8 lda.str bundle
20 lda.str none
32 lda.str normalized-bundlename
44 lda.str normalized
46 lda.str normalized
56 lda.str string
72 lda.str package
74 lda.str package
143 lda.str none
[all …]
/arkcompiler/runtime_core/static_core/tests/vm-benchmarks/src/vmb/
Dshell.py42 out: str = ''
43 err: str = ''
47 def grep(self, regex: str) -> str: argument
77 self.tm = float(str(tmp[1]) + "." + tmp[2])
79 self.tm = int(tmp[0]) * 60 + float(str(tmp[1]) + "." + tmp[2])
109 def timed_cmd(cmd: str) -> str: argument
113 cmd: str, argument
116 cwd: str = '') -> ShellResult: argument
119 def run_async(self, cmd: str) -> None: argument
123 src: Union[str, Path], argument
[all …]
Dlang.py60 def get_import_line(self, lib: str, what: str) -> str: argument
65 def get_method_call(self, name: str, typ: str) -> str: argument
72 self, values: Dict[str, Any], custom_values: Dict[str, Any] argument
73 ) -> Dict[str, str]:
77 def parse_state(self, line: str) -> str: argument
83 def parse_param(self, line: str) -> Optional[Tuple[str, str]]: argument
91 def parse_func(self, line: str) -> Optional[Tuple[str, str]]: argument
98 def parse_import(self, line: str) -> Optional[Tuple[str, str]]: argument
/arkcompiler/runtime_core/static_core/plugins/ets/playground/backend/src/arkts_playground/deps/
Drunner.py30 def __init__(self, build: str, timeout: int = 120): argument
39 self.disasm_bin = str(bin_path / "ark_disasm")
40 self.ark_bin = str(bin_path / "ark")
41 self.es2panda = str(bin_path / "es2panda")
42 self.stdlib_abc = str(_build / "plugins" / "ets" / "etsstdlib.abc")
53 async def _save_code(tempdir: str, code: str) -> str: argument
57 :rtype: str
64 return str(stsfile.name)
66 async def get_versions(self) -> Tuple[str, str, str]:
68 :rtype: Tuple[str, str]
[all …]
/arkcompiler/ets_runtime/ecmascript/mem/
Dc_string.cpp23 long CStringToL(const CString &str) in CStringToL() argument
26 int64_t result = std::strtol(str.c_str(), &endPtr, DEC_BASE); in CStringToL()
27 ASSERT(!(result == 0 && str.c_str() == endPtr) && "CString argument is not long int"); in CStringToL()
31 int64_t CStringToLL(const CString &str) in CStringToLL() argument
34 int64_t result = std::strtoll(str.c_str(), &endPtr, DEC_BASE); in CStringToLL()
35 ASSERT(!(result == 0 && str.c_str() == endPtr) && "CString argument is not long long int"); in CStringToLL()
39 uint64_t CStringToULL(const CString &str) in CStringToULL() argument
42 uint64_t result = std::strtoull(str.c_str(), &endPtr, DEC_BASE); in CStringToULL()
43 …ASSERT(!(result == 0 && str.c_str() == endPtr) && "CString argument is not unsigned long long int"… in CStringToULL()
47 float CStringToF(const CString &str) in CStringToF() argument
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/mempool/src/
Dmaple_string.cpp18 MapleString::MapleString(const char *str, size_t size, MemPool *currMp) in MapleString() argument
19 : data(NewData(currMp, str, size)), memPool(currMp), dataLength(size) in MapleString()
23 MapleString::MapleString(const char *str, MemPool *currMp) : MapleString(str, StrLen(str), currMp) … in MapleString() argument
27 MapleString::MapleString(const MapleString &str, MemPool *currMp) : MapleString(str.data, str.dataL… in MapleString() argument
29 MapleString::MapleString(const MapleString &str) : MapleString(str, str.memPool) {} in MapleString() argument
31 MapleString::MapleString(const std::string &str, MemPool *currMp) : MapleString(str.data(), str.len… in MapleString() argument
39 char *str = static_cast<char *>(memPool->Malloc((len + 1) * sizeof(char))); in NewData() local
40 CHECK_FATAL(str != nullptr, "MemPool::Malloc failed"); in NewData()
42 errno_t err = memcpy_s(str, len, source, len); in NewData()
45 str[len] = 0; in NewData()
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/checked/
Dets_string_equals.sts54 function equals_null_str(str: String | null) {
55 return getnull() == str;
57 function not_equals_null_str(str: String | null) {
58 return getnull() != str;
60 function equals_str_null(str: String | null) {
61 return str == getnull();
63 function not_equals_str_null(str: String | null) {
64 return str != getnull();
68 let str = "abc";
70 assert equals_str_str(str, str);
[all …]
/arkcompiler/ets_frontend/es2panda/test/compiler/js/
Dtest-tag-template-string-escape-error.js16 function fn(str, substitute) { argument
17 return substitute + str[1];
19 const str = 'ES2021'; constant
20 const result = fn`${str} \ubuntu`;
21 const result1 = fn`${str} \123`;
22 const result2 = fn`${str} \0123`;
23 const result3 = fn`${str} \u{11ffff}`;
24 const result31 = fn`${str} \u{10ff}`;
25 const result4 = fn`${str} \u{12dd`;
26 const result41 = fn`${str} \u12dd`;
[all …]
/arkcompiler/ets_frontend/es2panda/test/compiler/ts/cases/conformance/enums/
Dtest-ts-enum-16.ts18 a = "str",
19 b = "str" + "str"
23 a = "str",
30 c = s2_1.b+"str"
34 a = ("str"),
35 b = (("str") + ("str"+"str")),
36 c = "str" + ("str") + s2_1.b
40 print(s2["str"]);
/arkcompiler/ets_frontend/es2panda/test/optimizer/js/branch-elimination/
Dtest-branch-elimination-expected.pa.txt8 lda.str good
23 lda.str good
38 lda.str good
53 lda.str good
66 lda.str 0
70 lda.str good
74 lda.str 0
80 lda.str 1
88 lda.str 0
96 lda.str 1
[all …]

12345678910>>...110