Debian Codegraph @

bytes_safe.go

raw symbols SCIP
1 // +build appengine appenginevm tinygo
2
3 // SYS-REQ-001, SYS-REQ-013, SYS-REQ-014: safe build-tag byte utilities
4 package jsonparser
5
6 import (
7 "strconv"
8 )
9
10 // See fastbytes_unsafe.go for explanation on why *[]byte is used (signatures must be consistent with those in that file)
11
12 func equalStr(b *[]byte, s string) bool {
13 return string(*b) == s
14 }
15
16 func parseFloat(b *[]byte) (float64, error) {
17 return strconv.ParseFloat(string(*b), 64)
18 }
19
20 func bytesToString(b *[]byte) string {
21 return string(*b)
22 }
23
24 func StringToBytes(s string) []byte {
25 return []byte(s)
26 }