#include <iostream>
#include <seqan/index.h>

using namespace std;
using namespace seqan;

int main ()
{
	String<char> text = "hello world!";
	String<char> pattern = "l";
	String<unsigned> sa;

	resize(sa, length(text));
	createSuffixArray(sa, text, Skew7());

	Pair<unsigned> hitRange;
	hitRange = equalRangeSA(text, sa, pattern);

	for(unsigned i = hitRange.i1; i < hitRange.i2; ++i)
		cout << sa[i] << " ";
	cout << endl;
 
	return 0;
}
