there is a program called xstring which does just that i remeber it being used to build X11Rn (for some n) -- simon