Very simple implementation of prefix and suffix