MCPcopy Create free account
hub / github.com/segmentio/encoding / Number

Method Number

json/token.go:334–342  ·  view source on GitHub ↗

Number returns true if v contains a number value.

()

Source from the content-addressed store, hash-verified

332
333// Number returns true if v contains a number value.
334func (v RawValue) Number() bool {
335 if len(v) != 0 {
336 switch v[0] {
337 case '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
338 return true
339 }
340 }
341 return false
342}
343
344// AppendUnquote writes the unquoted version of the string value in v into b.
345func (v RawValue) AppendUnquote(b []byte) []byte {

Callers 2

codec.goFile · 0.80
json_test.goFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected