#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   {
      uCalc::Transformer t;
      t.Owned(); // Causes t to be released when it goes out of scope
      t.Text("apple banana apple cherry");
      t.Pattern("apple");
      t.Find();

      auto m = t.Matches();
      cout << "Matches found: " << m.Count() << endl;
      if (m.Count() > 0) {
         cout << "First match: " << m[0].Text() << endl;
      }
   };
}