print string to lcd without lcd library with 4 bit bus?

I tried searching for the actual library code, but I was unsuccessful.

If you are able to use the library, you have the source code on your computer. Where depends on your operating system and which library you are talking about.