Home
last modified time | relevance | path

Searched refs:UnicodeFromUtf8 (Results 1 – 4 of 4) sorted by relevance

/arkcompiler/ets_runtime/ecmascript/base/tests/
Dstring_helper_test.cpp132 HWTEST_F_L0(StringHelperTest, UnicodeFromUtf8) in HWTEST_F_L0() argument
140 EXPECT_EQ(StringHelper::UnicodeFromUtf8(oneByteVaild1, maxLen, pp), 0); in HWTEST_F_L0()
141 EXPECT_EQ(StringHelper::UnicodeFromUtf8(oneByteVaild2, maxLen, pp), 127); in HWTEST_F_L0()
142 EXPECT_EQ(StringHelper::UnicodeFromUtf8(oneByteUnvaild, maxLen, pp), -1); in HWTEST_F_L0()
148 …EXPECT_EQ(StringHelper::UnicodeFromUtf8(twoByteVaild, maxLen, pp), 2047); // 2047 : utf8 [0xDF, 0x… in HWTEST_F_L0()
149 EXPECT_EQ(StringHelper::UnicodeFromUtf8(twoByteUnvaild1, maxLen, pp), -1); in HWTEST_F_L0()
150 EXPECT_EQ(StringHelper::UnicodeFromUtf8(twoByteUnvaild2, maxLen, pp), -1); in HWTEST_F_L0()
158 …EXPECT_EQ(StringHelper::UnicodeFromUtf8(threeByteVaild, maxLen, pp), 65535); // 65535 : utf8 [0xEF… in HWTEST_F_L0()
159 EXPECT_EQ(StringHelper::UnicodeFromUtf8(threeByteUnvaild1, maxLen, pp), -1); in HWTEST_F_L0()
160 EXPECT_EQ(StringHelper::UnicodeFromUtf8(threeByteUnvaild2, maxLen, pp), -1); in HWTEST_F_L0()
[all …]
/arkcompiler/runtime_core/static_core/runtime/regexp/ecmascript/
Dregexp_parser.cpp66 int UnicodeFromUtf8(const uint8_t *p, int maxLen, const uint8_t **pp) in UnicodeFromUtf8() function
876 c = static_cast<uint32_t>(UnicodeFromUtf8(p, UTF8_CHAR_LEN_MAX, &p)); in ParseGroupSpecifier()
/arkcompiler/ets_runtime/ecmascript/base/
Dstring_helper.h196 static int UnicodeFromUtf8(const uint8_t *p, int maxLen, const uint8_t **pp) in UnicodeFromUtf8() function
/arkcompiler/ets_runtime/ecmascript/regexp/
Dregexp_parser.cpp939 … c = static_cast<uint32_t>(base::StringHelper::UnicodeFromUtf8(p, UTF8_CHAR_LEN_MAX, &p)); in ParseGroupSpecifier()
1345 … result = static_cast<uint32_t>(base::StringHelper::UnicodeFromUtf8(p, UTF8_CHAR_LEN_MAX, &p)); in ParseCharacterEscape()