Home
last modified time | relevance | path

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

12345678910>>...83

/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/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/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
114 Log.exception_and_raise(_LOGGER, str(ex))
117 def read_file(file_path: Union[Path, str]) -> str: argument
123 def write_2_file(file_path: Union[Path, str], content: str) -> None: argument
132 def purify(line: str) -> str: argument
[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/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/optimizer/ts/branch-elimination/projects/ts_ohmurl_project/
Dtest-import-exec-expected.pa.txt7 lda.str bundle
9 lda.str bundle
23 lda.str none
37 lda.str normalized-bundlename
51 lda.str normalized
53 lda.str normalized
63 lda.str string
81 lda.str package
83 lda.str package
156 lda.str none
[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/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/ets_frontend/es2panda/test/optimizer/js/branch-elimination/
Dtest-branch-elimination-expected.pa.txt9 lda.str good
24 lda.str good
39 lda.str good
54 lda.str good
67 lda.str 0
71 lda.str good
75 lda.str 0
81 lda.str 1
89 lda.str 0
97 lda.str 1
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/mempool/src/
Dmaple_string.cpp19 MapleString::MapleString(const char *str, size_t size, MemPool *currMp) in MapleString() argument
20 : data(NewData(currMp, str, size)), memPool(currMp), dataLength(size) in MapleString()
24 MapleString::MapleString(const char *str, MemPool *currMp) : MapleString(str, StrLen(str), currMp) … in MapleString() argument
28 MapleString::MapleString(const MapleString &str, MemPool *currMp) : MapleString(str.data, str.dataL… in MapleString() argument
30 MapleString::MapleString(const MapleString &str) : MapleString(str, str.memPool) {} in MapleString() argument
32 MapleString::MapleString(const std::string &str, MemPool *currMp) : MapleString(str.data(), str.len… in MapleString() argument
40 char *str = static_cast<char *>(memPool->Malloc((len + 1) * sizeof(char))); in NewData() local
41 CHECK_FATAL(str != nullptr, "MemPool::Malloc failed"); in NewData()
43 errno_t err = memcpy_s(str, len, source, len); in NewData()
46 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_runtime/ecmascript/
Djs_date.cpp200 int JSDate::GetSignedNumFromString(const CString &str, int len, int *index) in GetSignedNumFromString() argument
203 GetNumFromString(str, len, index, &res); in GetSignedNumFromString()
204 if (str.at(0) == NEG) { in GetSignedNumFromString()
211 bool JSDate::GetNumFromString(const CString &str, int len, int *index, int *num) in GetNumFromString() argument
216 oneByte = str.at(indexStr); in GetNumFromString()
227 oneByte = str.at(indexStr); in GetNumFromString()
256 JSTaggedValue JSDate::LocalParseStringToMs(const CString &str) in LocalParseStringToMs() argument
266 int len = static_cast<int>(str.length()); in LocalParseStringToMs()
275 localSpace = str.find(' ', index); in LocalParseStringToMs()
276 CString strMonth = str.substr(localSpace + 1, LENGTH_MONTH_NAME); in LocalParseStringToMs()
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/mempool/include/
Dmaple_string.h29 MapleString(const MapleString &str);
30 MapleString(const char *str, MemPool *memPool);
31 MapleString(const char *str, size_t size, MemPool *memPool); // copyin
33 MapleString(const MapleString &str, MemPool *memPool);
34 MapleString(const std::string &str, MemPool *memPool);
75 MapleString &operator=(const char *str)
77 if (str == nullptr) {
80 size_t size = strlen(str);
81 CHECK_FATAL(size <= UINT_MAX - 1, "str too large");
93 errno_t eNum = memcpy_s(data, size + 1, str, size);
[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_runtime/test/moduletest/stringslice/
Dstringslice.js23 let str = "The morning is upon us."; // str1 的长度是 23。 variable
24 print(str.slice(1, 8));
25 print(str.slice(4, -2));
26 print(str.slice(12));
27 print(str.slice(30));
28 print(str.slice(-3));
29 print(str.slice(-3, -1));
30 print(str.slice(0, -1));
31 print(str.slice(4, -1));
32 print(str.slice(-11, 16));
[all …]
/arkcompiler/ets_runtime/ecmascript/mem/
Dc_string.cpp25 long CStringToL(const CString &str) in CStringToL() argument
28 int64_t result = std::strtol(str.c_str(), &endPtr, BASE); in CStringToL()
29 ASSERT(!(result == 0 && str.c_str() == endPtr) && "CString argument is not long int"); in CStringToL()
33 int64_t CStringToLL(const CString &str) in CStringToLL() argument
36 int64_t result = std::strtoll(str.c_str(), &endPtr, BASE); in CStringToLL()
37 ASSERT(!(result == 0 && str.c_str() == endPtr) && "CString argument is not long long int"); in CStringToLL()
41 uint64_t CStringToULL(const CString &str) in CStringToULL() argument
44 uint64_t result = std::strtoull(str.c_str(), &endPtr, BASE); in CStringToULL()
45 …ASSERT(!(result == 0 && str.c_str() == endPtr) && "CString argument is not unsigned long long int"… in CStringToULL()
49 float CStringToF(const CString &str) in CStringToF() argument
[all …]
/arkcompiler/runtime_core/static_core/tests/tests-u-runner/runner/options/
Dyaml_document.py32 self._document: Optional[Dict[str, Any]] = None
33 self._warnings: List[str] = []
36 def load(config_path: str) -> Dict[str, Any]: argument
39 data: Dict[str, Any] = yaml.safe_load(stream)
42 Log.exception_and_raise(_LOGGER, str(exc), yaml.YAMLError)
45 def save(config_path: str, data: Dict[str, Any]) -> None: argument
49 def load_configs(self, config_paths: Optional[List[str]]) -> None: argument
55 def document(self) -> Optional[Dict[str, Any]]:
58 def warnings(self) -> List[str]:
63 def get_value_by_path(self, yaml_path: str) -> Optional[Union[int, bool, str, List[str]]]: argument
[all …]
Ddecorator_value.py30 CliOptionType = Union[str, List[str]]
38 yaml_path: str, argument
72 if isinstance(cli_name, str):
88 def _to_qemu(names: Union[str, List[Tuple[str, bool]], None]) -> Optional[QemuKind]: argument
91 if isinstance(names, str):
103 TestSuiteFromCliValue = Optional[Union[bool, List[str]]]
104 TestSuiteFromCliKey = str
108 def _to_test_suites(names: Optional[List[Union[str, TestSuitesFromCliTuple]]]) -> Optional[Set[str]… argument
111 suites: Set[str] = set([])
113 if isinstance(name, str):
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/07.expressions/24.relational_expressions/02.string_comparison_operators/
Dstring_comparison.sts16 {% for str in string_comparison %}
19 desc: String comparison {{str.left}} {{str.op}} {{str.right}}
23 let x: string = "{{str.left}}"
24 let y: string = "{{str.right}}"
25 let z: String = new String("{{str.right}}")
26 assert ( x {{str.op}} y) == {{str.result}};
27 assert ( x {{str.op}} z) == {{str.result}};

12345678910>>...83