How do I do a custom check?

I do a request, get a reply, and would like to pass the returned body to another function which will perform various tests on that string.

i.e. I want to have tests of unlimited complexity which compose with the gatling check system.

If a test is failed I want to emit a failure just like the inbuilt tests do.

e.g.

check(bodyString.testAgainst(specialCheckFunction))

How would I do that?

Thanks.

Dino.

Maybe this thread can help: https://groups.google.com/d/msg/gatling/U6tAsD0xGI4/7YWii2AT7T4J