That would change between systems, and also how low level you wanted it?
For example if it was linux then it would be different depending on what gui you had, and also different for the terminal (depending on how hacky you wanted to do it)
for example if you have X then you use xclip, in the terminal you might use gpm, etc. etc.
On mac you would use pasteboard NSPasteboard,
on windows I can't recall at the moment but it's not that important because windows working with the clipboard is the easiest.
But this is all based on doing it the 'right' way, which I was thinking to do it the hacky way, that is to do a execute to get clipboard info and then just branch on what I had to execute based on OS.
The reason why I would prefer this is I don't actually see any difference in the result for my usecase, which is to get text If I am wanting to access smart clipboard content, like fragments of html it would have to be pretty complicated.
although it gets extra hacky by using a vbscript to access the windows clipboard and pipe it back.