diff options
Diffstat (limited to 'copypasta/examples/hello_world.rs')
-rw-r--r-- | copypasta/examples/hello_world.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/copypasta/examples/hello_world.rs b/copypasta/examples/hello_world.rs new file mode 100644 index 00000000..7d637f82 --- /dev/null +++ b/copypasta/examples/hello_world.rs @@ -0,0 +1,12 @@ +extern crate copypasta; + +use copypasta::ClipboardContext; +use copypasta::ClipboardProvider; + +fn main() { + let mut ctx = ClipboardContext::new().unwrap(); + + let the_string = "Hello, world!"; + + ctx.set_contents(the_string.to_owned()).unwrap(); +} |