mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-10 00:52:11 +01:00
Added 3 helper methods.
This commit is contained in:
parent
f5afa7eb8e
commit
f1965f4bd5
@ -1,6 +1,20 @@
|
||||
#include "html_parser.h"
|
||||
#include "core/error_macros.h"
|
||||
|
||||
bool HTMLParserAttribute::match_attrib(const String &attrib) {
|
||||
return attribute == attrib;
|
||||
}
|
||||
bool HTMLParserAttribute::match_data(const String &d) {
|
||||
return data == d;
|
||||
}
|
||||
bool HTMLParserAttribute::match_data(const Vector<String> &d) {
|
||||
//todo
|
||||
return false;
|
||||
}
|
||||
bool HTMLParserAttribute::contains_data(const String &d) {
|
||||
return attribute.find(d) != -1;
|
||||
}
|
||||
|
||||
String HTMLParserAttribute::to_string() {
|
||||
if (single) {
|
||||
return attribute;
|
||||
|
@ -10,6 +10,11 @@ public:
|
||||
String data;
|
||||
bool single;
|
||||
|
||||
bool match_attrib(const String &attrib);
|
||||
bool match_data(const String &d);
|
||||
bool match_data(const Vector<String> &d);
|
||||
bool contains_data(const String &d);
|
||||
|
||||
String to_string();
|
||||
void print();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user