mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2025-05-02 13:47:56 +02:00
Added 3 helper methods.
This commit is contained in:
parent
f5afa7eb8e
commit
f1965f4bd5
@ -1,6 +1,20 @@
|
|||||||
#include "html_parser.h"
|
#include "html_parser.h"
|
||||||
#include "core/error_macros.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() {
|
String HTMLParserAttribute::to_string() {
|
||||||
if (single) {
|
if (single) {
|
||||||
return attribute;
|
return attribute;
|
||||||
|
@ -10,6 +10,11 @@ public:
|
|||||||
String data;
|
String data;
|
||||||
bool single;
|
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();
|
String to_string();
|
||||||
void print();
|
void print();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user