https://github.com/fschutt/clipboard2
Improved clipboard handling (similar to rust-clipboard)
https://github.com/fschutt/clipboard2
Last synced: 11 months ago
JSON representation
Improved clipboard handling (similar to rust-clipboard)
- Host: GitHub
- URL: https://github.com/fschutt/clipboard2
- Owner: fschutt
- License: mit
- Created: 2018-01-23T03:45:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-09-19T20:22:38.000Z (almost 4 years ago)
- Last Synced: 2025-04-10T23:07:08.234Z (about 1 year ago)
- Language: Rust
- Size: 21.5 KB
- Stars: 5
- Watchers: 2
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# clipboard2
[](https://ci.appveyor.com/project/fschutt/clipboard2)
[](https://travis-ci.org/fschutt/clipboard2)
Hard fork of https://github.com/aweinstock314/rust-clipboard
This library has better error handling than the original one,
the code is mostly copied.
# Usage
```rust
extern crate clipboard2;
use clipboard2::{Clipboard, SystemClipboard};
fn main() {
let clipboard = SystemClipboard::new().unwrap();
clipboard.set_string_contents(String::from("Hello")).unwrap();
println!("{}", clipboard.get_string_contents().unwrap());
}
```