mirror of
https://github.com/1Password/arboard.git
synced 2025-07-07 13:25:18 +00:00
11 lines
316 B
Rust
11 lines
316 B
Rust
use arboard::Clipboard;
|
|
|
|
fn main() {
|
|
env_logger::init();
|
|
let mut clipboard = Clipboard::new().unwrap();
|
|
println!("Clipboard text was: {:?}", clipboard.get_text());
|
|
|
|
let the_string = "Hello, world!";
|
|
clipboard.set_text(the_string).unwrap();
|
|
println!("But now the clipboard text should be: \"{the_string}\"");
|
|
}
|