| // Copyright 2013 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| t, err := strconv.Unquote(s) |
| fmt.Printf("Unquote(%#v): %v\n", s, err) |
| fmt.Printf("Unquote(%#v) = %v\n", s, t) |
| // If the string doesn't have quotes, it can't be unquoted. |
| test(s) // invalid syntax |
| // Unquote("cafe\\u0301"): invalid syntax |
| // Unquote("`cafe\\u0301`") = cafe\u0301 |
| // Unquote("\"cafe\\u0301\"") = café |
| // Unquote("'\\u00e9'") = é |