Home
last modified time | relevance | path

Searched refs:StringPiece (Results 1 – 25 of 148) sorted by relevance

123456

/frameworks/base/libs/androidfw/tests/
DStringPiece_test.cpp28 StringPiece a("hello world", 5); in TEST()
29 StringPiece b("hello moon", 5); in TEST()
42 EXPECT_TRUE(StringPiece(testing) > banana); in TEST()
43 EXPECT_TRUE(StringPiece(testing) > car); in TEST()
44 EXPECT_TRUE(StringPiece(banana) < testing); in TEST()
45 EXPECT_TRUE(StringPiece(banana) < car); in TEST()
46 EXPECT_TRUE(StringPiece(car) < testing); in TEST()
47 EXPECT_TRUE(StringPiece(car) > banana); in TEST()
55 EXPECT_TRUE(StringPiece(testing) > banana); in TEST()
56 EXPECT_TRUE(StringPiece(testing) > car); in TEST()
[all …]
/frameworks/base/tools/aapt2/util/
DUtil.h53 std::vector<std::string> Split(const android::StringPiece& str, char sep);
54 std::vector<std::string> SplitAndLowercase(const android::StringPiece& str, char sep);
57 bool StartsWith(const android::StringPiece& str, const android::StringPiece& prefix);
60 bool EndsWith(const android::StringPiece& str, const android::StringPiece& suffix);
64 android::StringPiece TrimLeadingWhitespace(const android::StringPiece& str);
68 android::StringPiece TrimTrailingWhitespace(const android::StringPiece& str);
72 android::StringPiece TrimWhitespace(const android::StringPiece& str);
75 bool IsJavaClassName(const android::StringPiece& str);
78 bool IsJavaPackageName(const android::StringPiece& str);
84 bool IsAndroidPackageName(const android::StringPiece& str);
[all …]
DUtil.cpp35 using ::android::StringPiece;
42 const StringPiece& str, char sep, const std::function<char(char)>& f) { in SplitAndTransform()
44 const StringPiece::const_iterator end = std::end(str); in SplitAndTransform()
45 StringPiece::const_iterator start = std::begin(str); in SplitAndTransform()
46 StringPiece::const_iterator current; in SplitAndTransform()
59 std::vector<std::string> Split(const StringPiece& str, char sep) { in Split()
63 std::vector<std::string> SplitAndLowercase(const StringPiece& str, char sep) { in SplitAndLowercase()
67 bool StartsWith(const StringPiece& str, const StringPiece& prefix) { in StartsWith()
74 bool EndsWith(const StringPiece& str, const StringPiece& suffix) { in EndsWith()
81 StringPiece TrimLeadingWhitespace(const StringPiece& str) { in TrimLeadingWhitespace()
[all …]
DFiles.h59 void AppendPath(std::string* base, android::StringPiece part);
62 std::string BuildPath(std::vector<const android::StringPiece>&& args);
68 android::StringPiece GetStem(const android::StringPiece& path);
71 android::StringPiece GetFilename(const android::StringPiece& path);
75 android::StringPiece GetExtension(const android::StringPiece& path);
78 bool IsHidden(const android::StringPiece& path);
81 std::string PackageToPath(const android::StringPiece& package);
87 bool AppendArgsFromFile(const android::StringPiece& path, std::vector<std::string>* out_arglist,
91 bool AppendSetArgsFromFile(const android::StringPiece& path,
113 bool SetPattern(const android::StringPiece& pattern);
[all …]
DFiles.cpp41 using ::android::StringPiece;
142 StringPiece GetStem(const StringPiece& path) { in GetStem()
147 return StringPiece(start, current - start); in GetStem()
153 StringPiece GetFilename(const StringPiece& path) { in GetFilename()
161 return StringPiece(last_dir_sep, end - last_dir_sep); in GetFilename()
164 StringPiece GetExtension(const StringPiece& path) { in GetExtension()
165 StringPiece filename = GetFilename(path); in GetExtension()
169 return StringPiece(c, end - c); in GetExtension()
174 bool IsHidden(const android::StringPiece& path) { in IsHidden()
178 void AppendPath(std::string* base, StringPiece part) { in AppendPath()
[all …]
/frameworks/base/tools/aapt2/cmd/
DCommand.h34 explicit Command(const android::StringPiece& name) : name_(name.to_string()), in Command()
38 explicit Command(const android::StringPiece& name, const android::StringPiece& short_name) in Command()
53 void AddRequiredFlag(const android::StringPiece& name, const android::StringPiece& description,
56 void AddRequiredFlagList(const android::StringPiece& name,
57 const android::StringPiece& description, std::vector<std::string>* value,
60 void AddOptionalFlag(const android::StringPiece& name, const android::StringPiece& description,
63 void AddOptionalFlagList(const android::StringPiece& name,
64 const android::StringPiece& description, std::vector<std::string>* value,
67 void AddOptionalFlagList(const android::StringPiece& name,
68 const android::StringPiece& description,
[all …]
DCommand.cpp32 using android::StringPiece;
36 std::string GetSafePath(const StringPiece& arg) { in GetSafePath()
54 void Command::AddRequiredFlag(const StringPiece& name, const StringPiece& description, in AddRequiredFlag()
56 auto func = [value, flags](const StringPiece& arg) -> bool { in AddRequiredFlag()
64 void Command::AddRequiredFlagList(const StringPiece& name, const StringPiece& description, in AddRequiredFlagList()
66 auto func = [value, flags](const StringPiece& arg) -> bool { in AddRequiredFlagList()
74 void Command::AddOptionalFlag(const StringPiece& name, const StringPiece& description, in AddOptionalFlag()
76 auto func = [value, flags](const StringPiece& arg) -> bool { in AddOptionalFlag()
84 void Command::AddOptionalFlagList(const StringPiece& name, const StringPiece& description, in AddOptionalFlagList()
86 auto func = [value, flags](const StringPiece& arg) -> bool { in AddOptionalFlagList()
[all …]
/frameworks/minikin/libs/minikin/
DStringPiece.h26 class StringPiece {
28 StringPiece() : mData(nullptr), mLength(0) {} in StringPiece() function
29 StringPiece(const char* data) : mData(data), mLength(data == nullptr ? 0 : strlen(data)) {} in StringPiece() function
30 StringPiece(const char* data, size_t length) : mData(data), mLength(length) {} in StringPiece() function
31 StringPiece(const std::string& str) : mData(str.data()), mLength(str.size()) {} in StringPiece() function
40 inline StringPiece substr(size_t from, size_t length) const { in substr()
41 return StringPiece(mData + from, length); in substr()
59 inline bool operator==(const StringPiece& l, const StringPiece& r) {
72 inline bool operator==(const StringPiece& l, const char* s) {
80 inline bool operator!=(const StringPiece& l, const StringPiece& r) {
[all …]
/frameworks/base/tools/aapt2/
DResourceUtils.h42 bool ParseResourceName(const android::StringPiece& str, ResourceNameRef* out_resource,
53 bool ParseReference(const android::StringPiece& str, ResourceNameRef* out_reference,
60 bool IsReference(const android::StringPiece& str);
67 bool ParseAttributeReference(const android::StringPiece& str, ResourceNameRef* out_reference);
73 bool IsAttributeReference(const android::StringPiece& str);
91 Maybe<bool> ParseBool(const android::StringPiece& str);
96 Maybe<uint32_t> ParseInt(const android::StringPiece& str);
101 Maybe<ResourceId> ParseResourceId(const android::StringPiece& str);
106 Maybe<int> ParseSdkVersion(const android::StringPiece& str);
119 Maybe<Reference> ParseStyleParentReference(const android::StringPiece& str, std::string* out_error);
[all …]
DResourceTable.h62 Overlayable(const android::StringPiece& name, const android::StringPiece& actor) in Overlayable()
64 Overlayable(const android::StringPiece& name, const android::StringPiece& actor, in Overlayable()
123 ResourceConfigValue(const android::ConfigDescription& config, const android::StringPiece& product) in ResourceConfigValue()
151 explicit ResourceEntry(const android::StringPiece& name) : name(name.to_string()) {} in ResourceEntry()
156 const android::StringPiece& product);
159 const android::StringPiece& product);
196 ResourceEntry* FindEntry(const android::StringPiece& name,
198 ResourceEntry* FindOrCreateEntry(const android::StringPiece& name,
240 const android::StringPiece& product, std::unique_ptr<Value> value,
245 const android::StringPiece& product, std::unique_ptr<Value> value,
[all …]
DResourceUtils.cpp36 using ::android::StringPiece;
59 type = ParseResourceType(StringPiece(name_in.type8, name_in.typeLen)); in ToResourceName()
94 type = ParseResourceType(StringPiece(name_in.type, name_in.type_len)); in ToResourceName()
116 bool ParseResourceName(const StringPiece& str, ResourceNameRef* out_ref, in ParseResourceName()
129 StringPiece package; in ParseResourceName()
130 StringPiece type; in ParseResourceName()
131 StringPiece entry; in ParseResourceName()
158 bool ParseReference(const StringPiece& str, ResourceNameRef* out_ref, in ParseReference()
160 StringPiece trimmed_str(util::TrimWhitespace(str)); in ParseReference()
205 bool IsReference(const StringPiece& str) { in IsReference()
[all …]
/frameworks/base/tools/aapt2/test/
DBuilders.h42 ResourceTableBuilder& SetPackageId(const android::StringPiece& package_name, uint8_t id);
43 ResourceTableBuilder& AddSimple(const android::StringPiece& name, const ResourceId& id = {});
44 ResourceTableBuilder& AddSimple(const android::StringPiece& name,
47 ResourceTableBuilder& AddReference(const android::StringPiece& name,
48 const android::StringPiece& ref);
49 ResourceTableBuilder& AddReference(const android::StringPiece& name, const ResourceId& id,
50 const android::StringPiece& ref);
51 ResourceTableBuilder& AddString(const android::StringPiece& name,
52 const android::StringPiece& str);
53 ResourceTableBuilder& AddString(const android::StringPiece& name, const ResourceId& id,
[all …]
DBuilders.cpp32 using ::android::StringPiece;
37 ResourceTableBuilder& ResourceTableBuilder::SetPackageId(const StringPiece& package_name, in SetPackageId()
44 ResourceTableBuilder& ResourceTableBuilder::AddSimple(const StringPiece& name, in AddSimple()
49 ResourceTableBuilder& ResourceTableBuilder::AddSimple(const StringPiece& name, in AddSimple()
55 ResourceTableBuilder& ResourceTableBuilder::AddReference(const StringPiece& name, in AddReference()
56 const StringPiece& ref) { in AddReference()
60 ResourceTableBuilder& ResourceTableBuilder::AddReference(const StringPiece& name, in AddReference()
62 const StringPiece& ref) { in AddReference()
66 ResourceTableBuilder& ResourceTableBuilder::AddString(const StringPiece& name, in AddString()
67 const StringPiece& str) { in AddString()
[all …]
DFixture.h44 const android::StringPiece GetTestDirectory() { in GetTestDirectory()
51 const std::string GetTestPath(const android::StringPiece& path) { in GetTestPath()
53 for (android::StringPiece part : util::Split(path, '/')) { in GetTestPath()
76 const android::StringPiece& flat_out_dir, IDiagnostics* diag);
80 bool Link(const std::vector<std::string>& args, const android::StringPiece& flat_dir,
88 const android::StringPiece& path);
/frameworks/base/tools/aapt2/xml/
DXmlDom.h100 Attribute* FindAttribute(const android::StringPiece& ns, const android::StringPiece& name);
101 const Attribute* FindAttribute(const android::StringPiece& ns,
102 const android::StringPiece& name) const;
103 Attribute* FindOrCreateAttribute(const android::StringPiece& ns,
104 const android::StringPiece& name);
105 void RemoveAttribute(const android::StringPiece& ns,
106 const android::StringPiece& name);
108 Element* FindChild(const android::StringPiece& ns, const android::StringPiece& name);
109 const Element* FindChild(const android::StringPiece& ns, const android::StringPiece& name) const;
111 Element* FindChildWithAttribute(const android::StringPiece& ns, const android::StringPiece& name,
[all …]
DXmlPullParser.h124 Maybe<ExtractedPackage> TransformPackageAlias(const android::StringPiece& alias) const override;
150 const_iterator FindAttribute(android::StringPiece namespace_uri, android::StringPiece name) const;
194 Maybe<android::StringPiece> FindAttribute(const XmlPullParser* parser,
195 const android::StringPiece& name);
202 Maybe<android::StringPiece> FindNonEmptyAttribute(const XmlPullParser* parser,
203 const android::StringPiece& name);
306 android::StringPiece namespace_uri, android::StringPiece name) const { in FindAttribute()
310 std::pair<android::StringPiece, android::StringPiece>(namespace_uri, name), in FindAttribute()
312 const std::pair<android::StringPiece, android::StringPiece>& rhs) -> bool { in FindAttribute()
DXmlDom.cpp34 using ::android::StringPiece;
158 const StringPiece str(s, len); in CharacterDataHandler()
417 Attribute* Element::FindAttribute(const StringPiece& ns, const StringPiece& name) { in FindAttribute()
421 const Attribute* Element::FindAttribute(const StringPiece& ns, const StringPiece& name) const { in FindAttribute()
430 void Element::RemoveAttribute(const StringPiece& ns, const StringPiece& name) { in RemoveAttribute()
439 Attribute* Element::FindOrCreateAttribute(const StringPiece& ns, const StringPiece& name) { in FindOrCreateAttribute()
448 Element* Element::FindChild(const StringPiece& ns, const StringPiece& name) { in FindChild()
452 const Element* Element::FindChild(const StringPiece& ns, const StringPiece& name) const { in FindChild()
456 Element* Element::FindChildWithAttribute(const StringPiece& ns, const StringPiece& name, in FindChildWithAttribute()
457 const StringPiece& attr_ns, const StringPiece& attr_name, in FindChildWithAttribute()
[all …]
DXmlUtil.cpp26 using ::android::StringPiece;
31 std::string BuildPackageNamespace(const StringPiece& package, bool private_reference) { in BuildPackageNamespace()
40 StringPiece schema_prefix = kSchemaPublicPrefix; in ExtractPackageFromNamespace()
41 StringPiece package = namespace_uri; in ExtractPackageFromNamespace()
49 StringPiece schema_prefix = kSchemaPrivatePrefix; in ExtractPackageFromNamespace()
50 StringPiece package = namespace_uri; in ExtractPackageFromNamespace()
/frameworks/minikin/tests/unittest/
DStringPieceTest.cpp25 StringPiece s(nullptr); in TEST()
31 StringPiece s(""); in TEST()
37 StringPiece s("", 0); in TEST()
43 StringPiece s("abcde"); in TEST()
51 StringPiece s("abcde", 5); in TEST()
59 StringPiece s("abcde", 3); in TEST()
68 StringPiece s(kText + 2, 3); in TEST()
77 StringPiece s(kText + 2); in TEST()
87 StringPiece s("abcde"); in TEST()
97 StringPiece s("mississippi"); in TEST()
[all …]
/frameworks/base/tools/aapt2/java/
DAnnotationProcessor.cpp28 using ::android::StringPiece;
32 StringPiece AnnotationProcessor::ExtractFirstSentence(const StringPiece& comment) { in ExtractFirstSentence()
53 StringPiece doc_str;
55 StringPiece annotation;
80 const StringPiece trimmed = util::TrimWhitespace(comment); in AppendCommentLine()
97 void AnnotationProcessor::AppendComment(const StringPiece& comment) { in AppendComment()
99 for (StringPiece line : util::Tokenize(comment, '\n')) { in AppendComment()
116 for (const StringPiece& line : util::Tokenize(result, '\n')) { in Print()
DJavaClassGenerator.h73 bool Generate(const android::StringPiece& package_name_to_generate, io::OutputStream* out,
76 bool Generate(const android::StringPiece& package_name_to_generate,
77 const android::StringPiece& output_package_name, io::OutputStream* out,
82 static std::string TransformToFieldName(const android::StringPiece& symbol);
90 Maybe<std::string> UnmangleResource(const android::StringPiece& package_name,
91 const android::StringPiece& package_name_to_generate,
94 bool ProcessType(const android::StringPiece& package_name_to_generate,
110 const android::StringPiece& package_name_to_generate,
/frameworks/base/libs/androidfw/include/androidfw/
DResourceUtils.h28 bool ExtractResourceName(const StringPiece& str, StringPiece* out_package, StringPiece* out_type,
29 StringPiece* out_entry);
35 const StringPiece& package_name,
/frameworks/base/tools/aapt2/compile/
DPseudolocalizer.cpp21 using android::StringPiece;
45 std::string Text(const StringPiece& text) override { return text.to_string(); } in Text()
46 std::string Placeholder(const StringPiece& text) override { return text.to_string(); } in Placeholder()
51 std::string Text(const StringPiece& text) override;
52 std::string Placeholder(const StringPiece& text) override;
60 std::string Text(const StringPiece& text) override;
61 std::string Placeholder(const StringPiece& text) override;
87 std::string Pseudolocalizer::Text(const StringPiece& text) { in Text()
352 std::string PseudoMethodAccent::Text(const StringPiece& source) { in Text()
438 std::string PseudoMethodAccent::Placeholder(const StringPiece& source) { in Placeholder()
[all …]
/frameworks/base/libs/androidfw/
DUtil.cpp45 std::u16string Utf8ToUtf16(const StringPiece& utf8) { in Utf8ToUtf16()
72 const StringPiece& str, char sep, const std::function<char(char)>& f) { in SplitAndTransform()
74 const StringPiece::const_iterator end = std::end(str); in SplitAndTransform()
75 StringPiece::const_iterator start = std::begin(str); in SplitAndTransform()
76 StringPiece::const_iterator current; in SplitAndTransform()
89 std::vector<std::string> SplitAndLowercase(const StringPiece& str, char sep) { in SplitAndLowercase()
/frameworks/base/tools/aapt2/format/
DArchive.cpp32 using ::android::StringPiece;
43 bool Open(const StringPiece& out_dir) { in Open()
56 bool StartEntry(const StringPiece& path, uint32_t flags) override { in StartEntry()
94 bool WriteFile(const StringPiece& path, uint32_t flags, io::InputStream* in) override { in WriteFile()
129 bool Open(const StringPiece& path) { in Open()
139 bool StartEntry(const StringPiece& path, uint32_t flags) override { in StartEntry()
179 bool WriteFile(const StringPiece& path, uint32_t flags, io::InputStream* in) override { in WriteFile()
253 const StringPiece& path) { in CreateDirectoryArchiveWriter()
263 const StringPiece& path) { in CreateZipFileArchiveWriter()

123456