Lines Matching defs:String
25 // its String method returns "<invalid Value>", and all other methods panic.
151 Method string
155 func (e *ValueError) Error() string {
159 return "reflect: call of " + e.Method + " on " + e.Kind.String() + " Value"
164 func methodName() string {
320 func (v Value) call(op string, in []Value) []Value {
371 panic("reflect: " + op + " using " + xt.String() + " as type " + targ.String())
382 panic("reflect: cannot use " + xt.String() + " as type " + elem.String() + " in " + op)
525 out[i].typ.String() + " for " + typ.String())
555 func methodReceiver(op string, v Value, methodIndex int) (rcvrtype, t *rtype, fn unsafe.Pointer) {
664 func funcName(f func([]Value) []Value) string {
805 func (v Value) FieldByName(name string) Value {
817 func (v Value) FieldByNameFunc(match func(string) bool) Value {
840 // It panics if v's Kind is not Array, Slice, or String or i is out of range.
873 case String:
876 panic("reflect: string index out of range")
994 // If IsValid returns false, all other methods except String panic.
1008 // It panics if v's Kind is not Array, Chan, Map, Slice, or String.
1022 case String:
1023 // String is bigger than a word; assume flagIndir.
1147 func (v Value) MethodByName(name string) Value {
1521 // It panics if v's Kind is not String or if CanSet() is false.
1522 func (v Value) SetString(x string) {
1524 v.mustBe(String)
1525 *(*string)(v.ptr) = x
1529 // It panics if v's Kind is not Array, Slice or String, or if v is an unaddressable array,
1556 case String:
1559 panic("reflect.Value.Slice: string slice index out of bounds")
1639 // String returns the string v's underlying value, as a string.
1640 // String is a special case because of Go's String method convention.
1641 // Unlike the other getters, it does not panic if v's Kind is not String.
1642 // Instead, it returns a string of the form "<T value>" where T is v's type.
1643 // The fmt package treats Values specially. It does not call their String
1645 func (v Value) String() string {
1649 case String:
1650 return *(*string)(v.ptr)
1652 // If you call String on a reflect.Value of other type, it's better to
1654 return "<" + v.Type().String() + " Value>"
1746 // StringHeader is the runtime representation of a string.
1782 func typesMustMatch(what string, t1, t2 Type) {
1784 panic(what + ": " + t1.String() + " != " + t2.String())
2147 func (v Value) assignTo(context string, dst *rtype, target unsafe.Pointer) Value {
2175 panic(context + ": value of type " + v.typ.String() + " is not assignable to type " + dst.String())
2187 panic("reflect.Value.Convert: value of type " + v.typ.String() + " cannot be converted to type " + t.String())
2202 case String:
2212 case String:
2232 case String:
2243 if dst.Kind() == String && src.Elem().PkgPath() == "" {
2321 func makeString(f flag, v string, t Type) Value {
2387 // convertOp: intXX -> string
2389 return makeString(v.flag&flagRO, string(v.Int()), t)
2392 // convertOp: uintXX -> string
2394 return makeString(v.flag&flagRO, string(v.Uint()), t)
2397 // convertOp: []byte -> string
2399 return makeString(v.flag&flagRO, string(v.Bytes()), t)
2402 // convertOp: string -> []byte
2404 return makeBytes(v.flag&flagRO, []byte(v.String()), t)
2407 // convertOp: []rune -> string
2409 return makeString(v.flag&flagRO, string(v.runes()), t)
2412 // convertOp: string -> []rune
2414 return makeRunes(v.flag&flagRO, []rune(v.String()), t)