clipboard_short/clipboard_short.rs
1use jabba_lib::jclipboard;
2
3fn main() {
4 let text = "hello";
5
6 jclipboard::check(); // verify if your platform is supported
7
8 jclipboard::set_text(text).unwrap();
9 println!("The text {:?} was pasted on the clipboard", text);
10
11 let read = jclipboard::get_text().unwrap();
12 println!("Contents of the clipboard: {:?}", read);
13
14 assert_eq!(read, text);
15}