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