Add programmtic interface

I found myself really wanting a programmatic interface to check strings without having to write to files. This is a simple function for doing so.