Home
last modified time | relevance | path

Searched refs:StringPiece16 (Results 1 – 25 of 26) sorted by relevance

12

/aosp12/frameworks/base/libs/androidfw/tests/
H A DStringPiece_test.cpp32 StringPiece16 a16(u"hello world", 5); in TEST()
33 StringPiece16 b16(u"hello moon", 5); in TEST()
79 StringPiece16 text16(u"I am a leaf on the wind."); in TEST()
80 StringPiece16 start_needle16(u"I am"); in TEST()
81 StringPiece16 end_needle16(u"wind."); in TEST()
82 StringPiece16 middle_needle16(u"leaf"); in TEST()
83 StringPiece16 empty_needle16(u""); in TEST()
84 StringPiece16 missing_needle16(u"soar"); in TEST()
85 StringPiece16 long_needle16(u"This string is longer than the text."); in TEST()
/aosp12/frameworks/base/cmds/idmap2/libidmap2/
H A DResourceUtils.cpp26 using android::StringPiece16;
79 out += Utf16ToUtf8(StringPiece16(name->type16, name->type_len)); in ResToTypeEntryName()
85 out += Utf16ToUtf8(StringPiece16(name->entry16, name->entry_len)); in ResToTypeEntryName()
H A DPrettyPrintVisitor.cpp102 stream_ << " \"" << str.value_or(StringPiece16(u"")) << "\""; in visit()
/aosp12/frameworks/base/libs/androidfw/
H A DResourceUtils.cpp68 if (base::expected<StringPiece16, NullOrIOError> type16_str = type_string_ref.string16(); in ToResourceName()
86 if (base::expected<StringPiece16, NullOrIOError> entry16_str = entry_string_ref.string16(); in ToResourceName()
112 result += util::Utf16ToUtf8(StringPiece16(resource_name.type16, resource_name.type_len)); in ToFormattedResourceString()
124 result += util::Utf16ToUtf8(StringPiece16(resource_name.entry16, resource_name.entry_len)); in ToFormattedResourceString()
H A DUtil.cpp59 std::string Utf16ToUtf8(const StringPiece16& utf16) { in Utf16ToUtf8()
H A DIdmap.cpp87 base::expected<StringPiece16, NullOrIOError> OverlayStringPool::stringAt(size_t idx) const { in stringAt()
H A DResourceTypes.cpp756 base::expected<StringPiece16, NullOrIOError> ResStringPool::stringAt(size_t idx) const in stringAt()
792 return StringPiece16(reinterpret_cast<const char16_t*>(str.unsafe_ptr()), in stringAt()
817 return StringPiece16(mCache[idx], *u16len); in stringAt()
876 return StringPiece16(u16str, *u16len); in stringAt()
985 const base::expected<StringPiece16, NullOrIOError> str16 = stringAt(idx); in string8ObjectAt()
1116 const base::expected<StringPiece16, NullOrIOError> s = stringAt(mid); in indexOfString()
1142 const base::expected<StringPiece16, NullOrIOError> s = stringAt(i); in indexOfString()
6370 base::expected<StringPiece16, NullOrIOError> StringPoolRef::string16() const { in string16()
/aosp12/frameworks/base/tools/aapt2/xml/
H A DXmlDom.cpp35 using ::android::StringPiece16;
232 attr.namespace_uri = util::Utf16ToUtf8(StringPiece16(str16, len)); in CopyAttributes()
237 attr.name = util::Utf16ToUtf8(StringPiece16(str16, len)); in CopyAttributes()
247 attr.value = util::Utf16ToUtf8(StringPiece16(str16, len)); in CopyAttributes()
297 decl.prefix = util::Utf16ToUtf8(StringPiece16(str16, len)); in Inflate()
302 decl.uri = util::Utf16ToUtf8(StringPiece16(str16, len)); in Inflate()
326 el->namespace_uri = util::Utf16ToUtf8(StringPiece16(str16, len)); in Inflate()
331 el->name = util::Utf16ToUtf8(StringPiece16(str16, len)); in Inflate()
352 text->text = util::Utf16ToUtf8(StringPiece16(str16, len)); in Inflate()
/aosp12/frameworks/base/tools/aapt2/compile/
H A DPseudolocaleGenerator.cpp29 using ::android::StringPiece16;
127 const StringPiece16 text(text16); in PseudolocalizeStyledString()
153 const StringPiece16 substr = text.substr(cursor, span->first_char - cursor); in PseudolocalizeStyledString()
180 const StringPiece16 substr = text.substr(cursor, parent_span->last_char - cursor + 1); in PseudolocalizeStyledString()
/aosp12/frameworks/base/tools/aapt2/util/
H A DUtil.cpp36 using ::android::StringPiece16;
452 std::string Utf16ToUtf8(const StringPiece16& utf16) { in Utf16ToUtf8()
550 StringPiece16 GetString16(const android::ResStringPool& pool, size_t idx) { in GetString16()
554 return StringPiece16(); in GetString16()
H A DUtil.h155 android::StringPiece16 GetString16(const android::ResStringPool& pool, size_t idx);
222 std::string Utf16ToUtf8(const android::StringPiece16& utf16);
/aosp12/frameworks/base/tools/aapt2/
H A DResourceUtils.cpp37 using ::android::StringPiece16;
52 util::Utf16ToUtf8(StringPiece16(name_in.package, name_in.packageLen)); in ToResourceName()
57 util::Utf16ToUtf8(StringPiece16(name_in.type, name_in.typeLen))); in ToResourceName()
72 util::Utf16ToUtf8(StringPiece16(name_in.name, name_in.nameLen)); in ToResourceName()
92 util::Utf16ToUtf8(StringPiece16(name_in.type16, name_in.type_len))); in ToResourceName()
107 util::Utf16ToUtf8(StringPiece16(name_in.entry16, name_in.entry_len)); in ToResourceName()
H A DDiagnostics.h64 message_ << android::StringPiece16(value);
H A DStringPool_test.cpp28 using ::android::StringPiece16;
/aosp12/frameworks/base/tools/aapt2/test/
H A DCommon.h145 ::testing::PrintToString(android::StringPiece16(a))) {
146 return android::StringPiece16(arg) == a;
/aosp12/frameworks/base/libs/androidfw/include/androidfw/
H A DUtil.h126 std::string Utf16ToUtf8(const StringPiece16& utf16);
H A DIdmap.h48 base::expected<StringPiece16, NullOrIOError> stringAt(size_t idx) const override;
H A DResourceTypes.h524 inline base::expected<StringPiece16, NullOrIOError> stringAt( in stringAt()
528 virtual base::expected<StringPiece16, NullOrIOError> stringAt(size_t idx) const;
579 base::expected<StringPiece16, NullOrIOError> string16() const;
H A DStringPiece.h88 using StringPiece16 = BasicStringPiece<char16_t>; variable
/aosp12/frameworks/base/cmds/idmap2/idmap2/
H A DLookup.cpp49 using android::StringPiece16;
/aosp12/frameworks/base/tools/aapt2/format/binary/
H A DTableFlattener_test.cpp130 << StringPiece16(actual_name.package, actual_name.packageLen) << ":" in Exists()
131 << StringPiece16(actual_name.type, actual_name.typeLen) << "/" in Exists()
132 << StringPiece16(actual_name.name, actual_name.nameLen) << "'"; in Exists()
H A DXmlFlattener_test.cpp27 using ::android::StringPiece16;
102 const StringPiece16 kAttr(u"attr"); in TEST_F()
H A DBinaryResourceParser.cpp453 util::Utf16ToUtf8(StringPiece16(entries.keyAt(i).string())); in ParseLibrary()
H A DTableFlattener.cpp49 static void strcpy16_htod(uint16_t* dst, size_t len, const StringPiece16& src) { in strcpy16_htod()
/aosp12/frameworks/base/tools/aapt2/process/
H A DSymbolTable.cpp39 using ::android::StringPiece16;

12