36 std::vector<Id> styles;
39 styles = str.
Split(
" ");
53 if (std::find(styles.begin(), styles.end(), id) != styles.end())
56 for (
const Id &sid : styles)
71 std::vector<Id> tmpvec;
73 std::remove_copy(styles.begin(), styles.end(), std::back_inserter(tmpvec), id);
76 for (
const Id &sid : styles)
std::vector< StringUTF8 > Split(const StringUTF8 &sep) const
Splits the string in multiple strings delimited by a set of separators.
std::vector< Id > GetStyleRefs(const Element &el)
Gets the list of style references.
bool IsNotEmpty() const noexcept
Checks if the string is not empty.
void AddStyleRef(Element &el, const Id &id)
Adds a style reference to an element.
void RemoveStyleRef(Element &el, const Id &id)
Removes a style reference to an element.
void SetAttribute(const StringUTF8 &name, const StringUTF8 &value)
Sets the value of an attribute.
T GetAttribute(const StringUTF8 &name, bool silent=true) const
Gets an attribute.
A character string class.