We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d968cb commit a3c0730Copy full SHA for a3c0730
src/html/example_test.go
@@ -0,0 +1,22 @@
1
+// Copyright 2015 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+package html_test
6
7
+import (
8
+ "fmt"
9
+ "html"
10
+)
11
12
+func ExampleEscapeString() {
13
+ const s = `"Fran & Freddie's Diner" <tasty@example.com>`
14
+ fmt.Println(html.EscapeString(s))
15
+ // Output: "Fran & Freddie's Diner" <tasty@example.com>
16
+}
17
18
+func ExampleUnescapeString() {
19
+ const s = `"Fran & Freddie's Diner" <tasty@example.com>`
20
+ fmt.Println(html.UnescapeString(s))
21
+ // Output: "Fran & Freddie's Diner" <tasty@example.com>
22
0 commit comments