#include <Utilities/Clipboard.hpp>
#include <Utilities/Extern.hpp>

void Clipboard::put(std::string text)
{
    SDL_SetClipboardText(text.c_str());
}

bool Clipboard::hasText()
{
    return SDL_HasClipboardText();
}

std::string Clipboard::get()
{
    char *s = SDL_GetClipboardText();
    std::string result = s;
    SDL_free(s);
    return result;
}