I think that changing the property name to "includesLastSegment" is much clearer. I'll change stringMatch to return that property rather than one called "lastSegment".