Quick and stupid question but I don't really know where to begin to search for this...

In linux, what function should I use to convert a uid to a user name, or a user name to a uid for comparason purposes?


Hopefully some of you linux gurus can help me out here