Have you considered the % operator?

Chris