diff --git a/benches/json.rs b/benches/json.rs
index 0a2d36d..69f4d87 100644
--- a/benches/json.rs
+++ b/benches/json.rs
@@ -51,7 +51,7 @@ fn data(b: &mut Bencher) {
 
     file.read_to_string(&mut data).unwrap();
 
-    let mut parser = Rdp::new(StringInput::new(&data));
+    let mut parser = Rdp::new(StringInput::new(data));
 
     b.iter(|| {
         parser.json();
diff --git a/src/inputs/string_input.rs b/src/inputs/string_input.rs
index e06b750..db1addd 100644
--- a/src/inputs/string_input.rs
+++ b/src/inputs/string_input.rs
@@ -5,6 +5,7 @@
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+use std::borrow::Cow;
 use std::iter::Peekable;
 use std::str::{self, Chars};
 
@@ -23,12 +24,12 @@ use super::super::Input;
 /// assert!(input.match_string("asdf"));
 /// assert!(!input.match_string("nope"));
 /// ```
-pub struct StringInput {
-    string: String,
+pub struct StringInput<'a> {
+    string: Cow<'a, str>,
     pos: usize
 }
 
-impl StringInput {
+impl<'a> StringInput<'a> {
     /// Creates a new `StringInput` from a `&str`.
     ///
     /// # Examples
@@ -40,15 +41,15 @@ impl StringInput {
     ///
     /// assert_eq!(input.len(), 3);
     /// ```
-    pub fn new(string: &str) -> StringInput {
+    pub fn new<T: Into<Cow<'a, str>>>(string: T) -> StringInput<'a> {
         StringInput {
-            string: string.to_owned(),
+            string: string.into(),
             pos : 0
         }
     }
 }
 
-impl Input for StringInput {
+impl<'a> Input for StringInput<'a> {
     #[inline]
     fn len(&self) -> usize {
         self.string.len()
