I think a function as Chris described it would be very useful as well, maybe not for your API, but for other uses.
EDIT
---------
My mistake... Didn't read too well what was really said and too long since I used AGS 'til now. Sorry.
EDIT
---------
My mistake... Didn't read too well what was really said and too long since I used AGS 'til now. Sorry.