промежуточный. частичный рефакторинг инициализации. еще не готов.

This commit is contained in:
2023-12-20 02:47:47 +03:00
parent c228832c94
commit 8edb0ba16b
27 changed files with 151 additions and 60 deletions

29
src/files/Text.h Normal file
View File

@@ -0,0 +1,29 @@
#pragma once
#include "String.h"
#include "Array.h"
class Text : public Array<String> {
public:
void Print() const {
printf("text length=%ld\n", this->getLength());
auto elems = this->getElements();
for (long i = 0; i < elems.size(); ++i) {
printf("i=%ld; [%s]\n", i, elems[i]->getCharArray());
// elements[i]->println();
}
}
bool hasMatch(const String& s) const {
for (auto& elem : this->getElements()) {
if (s.contains(*elem)) {
//printf("match: [%s]\n", elements[i]->getCharArray());
return true;
}
}
//printf("no matches for [%s]\n", s.getCharArray());
return false;
}
};