Searched refs:new_string (Results 1 – 2 of 2) sorted by relevance
/frameworks/base/tools/aapt2/compile/ |
D | PseudolocaleGenerator_test.cpp | 32 std::unique_ptr<StyledString> new_string = PseudolocalizeStyledString( in TEST() local 36 EXPECT_EQ(original_style.str, new_string->value->value); in TEST() 37 ASSERT_EQ(original_style.spans.size(), new_string->value->spans.size()); in TEST() 39 EXPECT_EQ(std::string("i"), *new_string->value->spans[0].name); in TEST() 40 EXPECT_EQ(std::u16string(u"H").size(), new_string->value->spans[0].first_char); in TEST() 41 EXPECT_EQ(std::u16string(u"Hello worl").size(), new_string->value->spans[0].last_char); in TEST() 43 EXPECT_EQ(std::string("b"), *new_string->value->spans[1].name); in TEST() 44 EXPECT_EQ(std::u16string(u"He").size(), new_string->value->spans[1].first_char); in TEST() 45 EXPECT_EQ(std::u16string(u"Hel").size(), new_string->value->spans[1].last_char); in TEST() 47 EXPECT_EQ(std::string("b"), *new_string->value->spans[2].name); in TEST() [all …]
|
D | PseudolocaleGenerator.cpp | 130 std::string new_string = localizer.Start(); in PseudolocalizeStyledString() local 139 uint32_t new_cursor = utf8_to_utf16_length(reinterpret_cast<const uint8_t*>(new_string.data()), in PseudolocalizeStyledString() 140 new_string.size(), false); in PseudolocalizeStyledString() 163 new_string += new_substr; in PseudolocalizeStyledString() 190 new_string += new_substr; in PseudolocalizeStyledString() 202 new_string += localizer.Text(util::Utf16ToUtf8(text.substr(cursor, text.size() - cursor))); in PseudolocalizeStyledString() 203 new_string += localizer.End(); in PseudolocalizeStyledString() 206 localized.str = std::move(new_string); in PseudolocalizeStyledString()
|