mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
Added String::endsWith().
Added support for "!important" in CSS properties. --HG-- branch : dev
This commit is contained in:
@@ -154,6 +154,20 @@ class EE_API String {
|
||||
*/
|
||||
static bool startsWith( const String& haystack, const String& needle );
|
||||
|
||||
/** Compare two strings from its end.
|
||||
* @param haystack The string to search in.
|
||||
* @param needle The searched string.
|
||||
* @return true if string starts with the substring
|
||||
*/
|
||||
static bool endsWith( const std::string& haystack, const std::string& needle );
|
||||
|
||||
/** Compare two strings from its end.
|
||||
* @param haystack The string to search in.
|
||||
* @param needle The searched string.
|
||||
* @return true if string starts with the substring
|
||||
*/
|
||||
static bool endsWith( const String& haystack, const String& needle );
|
||||
|
||||
/** Replace all occurrences of the search string with the replacement string. */
|
||||
static void replaceAll( std::string &target, const std::string& that, const std::string& with );
|
||||
|
||||
|
||||
@@ -37,6 +37,9 @@ class EE_API StyleSheetProperty {
|
||||
std::string mValue;
|
||||
Uint32 mSpecificity;
|
||||
bool mVolatile;
|
||||
bool mImportant;
|
||||
|
||||
void checkImportant();
|
||||
};
|
||||
|
||||
typedef std::map<std::string, StyleSheetProperty> StyleSheetProperties;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef STYLESHEETSELECTORRULE_HPP
|
||||
#ifndef STYLESHEETSELECTORRULE_HPP
|
||||
#define STYLESHEETSELECTORRULE_HPP
|
||||
|
||||
#include <eepp/core.hpp>
|
||||
@@ -68,7 +68,7 @@ class EE_API StyleSheetSelectorRule {
|
||||
const std::vector<std::string>& getStructuralPseudoClasses() const;
|
||||
|
||||
bool hasStructuralPseudoClass(const std::string & cls) const;
|
||||
|
||||
protected:
|
||||
int mSpecificity;
|
||||
PatternMatch mPatternMatch;
|
||||
std::string mTagName;
|
||||
|
||||
Reference in New Issue
Block a user