Lines Matching defs:String
34 renamedString string
67 s string
73 func (i I) String() string { return Sprintf("<%d>", int(i)) }
93 func (g G) GoString() string {
106 // P is a type with a String method with pointer receiver for testing %p.
111 func (p *P) String() string {
112 return "String(p)"
120 func (byteStringer) String() string {
135 fmt string
137 out string
143 // basic string
231 {"%q", string(0x110000), `"?"`},
232 {"%+q", string(0x110000), `"\ufffd"`},
233 {"%#q", string(0x110000), "`?`"},
234 {"%#+q", string(0x110000), "`?`"},
608 // Stringer applies only to string formats.
620 {"%#v", map[string]int{"a": 1}, `map[string]int{"a":1}`},
621 {"%#v", map[string]B{"a": {1, 2}}, `map[string]fmt_test.B{"a":fmt_test.B{I:1, j:2}}`},
622 {"%#v", []string{"a", "b"}, `[]string{"a", "b"}`},
655 {"%q", []string{"a", "b"}, `["a" "b"]`},
790 // string method on pointer
791 {"%s", &pValue, "String(p)"}, // String method...
801 {"no args", "hello", "no args%!(EXTRA string=hello)"},
807 {"%010.2", "12345", "%!(NOVERB)%!(EXTRA string=12345)"},
941 {"%v", reflect.ValueOf(A{}).Field(0).String(), "<int Value>"}, // Equivalent to the old way.
954 // Tests to check that not supported verbs generate an error string.
963 {"%?", "hello", "%!?(string=hello)"},
981 func zeroFill(prefix stringstring) string {
990 var pattern, chars string
1021 if _, ok := tt.val.(string); ok {
1052 realFmt += string(char)
1060 imagFmt += string(char)
1079 fmt string
1081 out string
1254 s := &[]interface{}{SI{12345}, map[int]string{0: "hello"}}
1281 data := []byte(string("0123456789"))
1303 desc string
1345 s += string(i)
1354 s += string(c)
1359 in string
1360 out string
1388 a string
1389 b string
1397 fmt string
1398 out string
1436 func presentInMap(s string, a []string, t *testing.T) {
1451 m0 := make(map[int]string)
1456 m1 := map[int]string{1: "one", 2: "two", 3: "three"}
1457 a := []string{"1:one", "2:two", "3:three"}
1470 var m map[string]int
1475 m = make(map[string]int)
1483 // right places, that is, between arg pairs in which neither is a string.
1523 fmt string
1525 out string
1550 {"%*d", args(5, "foo"), "%!d(string= foo)"},
1564 // PanicS is a type that panics in String.
1570 func (p PanicS) String() string {
1580 func (p PanicGo) GoString() string {
1595 fmt string
1597 out string
1599 // String
1624 // recurCount tests that erroneous String routine doesn't cause fatal recursion.
1632 func (r *Recur) String() string {
1681 in string
1683 out string
1753 s string