mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fabric: non-const AttributedString::getFragments()
Summary: This diff adds a non-const method to AttributedString that allows accessing a list of fragments by reference. Changelog: [Internal] Fabric-specific internal change. Reviewed By: sammy-SC Differential Revision: D20268040 fbshipit-source-id: cd0c8be126607b99686f7f596106b38fbe3da230
This commit is contained in:
committed by
Facebook Github Bot
parent
f18358dda6
commit
e1b8841c7a
@@ -82,7 +82,11 @@ void AttributedString::prependAttributedString(
|
||||
attributedString.fragments_.end());
|
||||
}
|
||||
|
||||
const Fragments &AttributedString::getFragments() const {
|
||||
Fragments const &AttributedString::getFragments() const {
|
||||
return fragments_;
|
||||
}
|
||||
|
||||
Fragments &AttributedString::getFragments() {
|
||||
return fragments_;
|
||||
}
|
||||
|
||||
|
||||
@@ -73,9 +73,14 @@ class AttributedString : public Sealable, public DebugStringConvertible {
|
||||
void prependAttributedString(const AttributedString &attributedString);
|
||||
|
||||
/*
|
||||
* Returns read-only reference to a list of fragments.
|
||||
* Returns a read-only reference to a list of fragments.
|
||||
*/
|
||||
const Fragments &getFragments() const;
|
||||
Fragments const &getFragments() const;
|
||||
|
||||
/*
|
||||
* Returns a reference to a list of fragments.
|
||||
*/
|
||||
Fragments &getFragments();
|
||||
|
||||
/*
|
||||
* Returns a string constructed from all strings in all fragments.
|
||||
|
||||
Reference in New Issue
Block a user