Source code CXString from CXCursor

I’m utilizing libclang and currently just trying to print cursor kind + first line of code for each cursor in file. Can’t find how to get file contents from CXSourceRange which I get from clang_getCursorExtent. Is it possible to get line of code for the cursor using libclang ?