Lines Matching refs:str

112 bool ParseResourceName(StringPiece str, ResourceNameRef* out_ref, bool* out_private) {  in ParseResourceName()  argument
113 if (str.empty()) { in ParseResourceName()
119 if (str.data()[0] == '*') { in ParseResourceName()
127 if (!android::ExtractResourceName(str.substr(offset, str.size() - offset), &package, &type, in ParseResourceName()
153 bool ParseReference(StringPiece str, ResourceNameRef* out_ref, bool* out_create, in ParseReference() argument
155 StringPiece trimmed_str(util::TrimWhitespace(str)); in ParseReference()
200 bool IsReference(StringPiece str) { in IsReference() argument
201 return ParseReference(str, nullptr, nullptr, nullptr); in IsReference()
204 bool ParseAttributeReference(StringPiece str, ResourceNameRef* out_ref) { in ParseAttributeReference() argument
205 StringPiece trimmed_str(util::TrimWhitespace(str)); in ParseAttributeReference()
237 bool IsAttributeReference(StringPiece str) { in IsAttributeReference() argument
238 return ParseAttributeReference(str, nullptr); in IsAttributeReference()
249 std::optional<Reference> ParseStyleParentReference(StringPiece str, std::string* out_error) { in ParseStyleParentReference() argument
250 if (str.empty()) { in ParseStyleParentReference()
254 StringPiece name = str; in ParseStyleParentReference()
281 *out_error = err.str(); in ParseStyleParentReference()
288 err << "invalid parent reference '" << str << "'"; in ParseStyleParentReference()
289 *out_error = err.str(); in ParseStyleParentReference()
298 std::optional<Reference> ParseXmlAttributeName(StringPiece str) { in ParseXmlAttributeName() argument
299 StringPiece trimmed_str = util::TrimWhitespace(str); in ParseXmlAttributeName()
327 std::unique_ptr<Reference> TryParseReference(StringPiece str, bool* out_create) { in TryParseReference() argument
330 if (ParseReference(str, &ref, out_create, &private_ref)) { in TryParseReference()
336 if (ParseAttributeReference(str, &ref)) { in TryParseReference()
345 std::unique_ptr<Item> TryParseNullOrEmpty(StringPiece str) { in TryParseNullOrEmpty() argument
346 const StringPiece trimmed_str(util::TrimWhitespace(str)); in TryParseNullOrEmpty()
366 std::unique_ptr<BinaryPrimitive> TryParseEnumSymbol(const Attribute* enum_attr, StringPiece str) { in TryParseEnumSymbol() argument
367 StringPiece trimmed_str(util::TrimWhitespace(str)); in TryParseEnumSymbol()
382 std::unique_ptr<BinaryPrimitive> TryParseFlagSymbol(const Attribute* flag_attr, StringPiece str) { in TryParseFlagSymbol() argument
387 if (util::TrimWhitespace(str).empty()) { in TryParseFlagSymbol()
392 for (StringPiece part : util::Tokenize(str, '|')) { in TryParseFlagSymbol()
428 std::unique_ptr<BinaryPrimitive> TryParseColor(StringPiece str) { in TryParseColor() argument
429 StringPiece color_str(util::TrimWhitespace(str)); in TryParseColor()
483 std::optional<bool> ParseBool(StringPiece str) { in ParseBool() argument
484 StringPiece trimmed_str(util::TrimWhitespace(str)); in ParseBool()
494 std::optional<uint32_t> ParseInt(StringPiece str) { in ParseInt() argument
495 std::u16string str16 = android::util::Utf8ToUtf16(str); in ParseInt()
503 std::optional<ResourceId> ParseResourceId(StringPiece str) { in ParseResourceId() argument
504 StringPiece trimmed_str(util::TrimWhitespace(str)); in ParseResourceId()
519 std::optional<int> ParseSdkVersion(StringPiece str) { in ParseSdkVersion() argument
520 StringPiece trimmed_str(util::TrimWhitespace(str)); in ParseSdkVersion()
545 std::unique_ptr<BinaryPrimitive> TryParseBool(StringPiece str) { in TryParseBool() argument
546 if (std::optional<bool> maybe_result = ParseBool(str)) { in TryParseBool()
558 std::unique_ptr<BinaryPrimitive> TryParseInt(StringPiece str) { in TryParseInt() argument
559 std::u16string str16 = android::util::Utf8ToUtf16(util::TrimWhitespace(str)); in TryParseInt()
571 std::unique_ptr<BinaryPrimitive> TryParseFloat(StringPiece str) { in TryParseFloat() argument
572 std::u16string str16 = android::util::Utf8ToUtf16(util::TrimWhitespace(str)); in TryParseFloat()
686 StringPiece str, const Attribute* attr, in TryParseItemForAttribute() argument
691 auto value = TryParseItemForAttribute(str, type_mask, on_create_reference); in TryParseItemForAttribute()
698 auto enum_value = TryParseEnumSymbol(attr, str); in TryParseItemForAttribute()
706 auto flag_value = TryParseFlagSymbol(attr, str); in TryParseItemForAttribute()
728 return out.str(); in BuildResourceFileName()
748 const std::string str = android::util::GetString(src_pool, data); in ParseBinaryResValue() local
755 android::StyleString style_str = {str}; in ParseBinaryResValue()
766 if (type != ResourceType::kString && util::StartsWith(str, "res/")) { in ParseBinaryResValue()
769 dst_pool->MakeRef(str, android::StringPool::Context( in ParseBinaryResValue()
783 dst_pool->MakeRef(str, android::StringPool::Context(config))); in ParseBinaryResValue()