- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 54 for asString (0.16 sec)
-
src/cmd/cgo/doc.go
// } import "C" import "unsafe" func main() { cs := C.CString("Hello from stdio") C.myprint(cs) C.free(unsafe.Pointer(cs)) } A few special functions convert between Go and C types by making copies of the data. In pseudo-Go definitions: // Go string to C string // The C string is allocated in the C heap using malloc. // It is the caller's responsibility to arrange for it to be
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Sun Mar 31 09:02:45 GMT 2024 - 42.1K bytes - Viewed (0) -
doc/go1.17_spec.html
particular architecture. </p> <h3 id="String_types">String types</h3> <p> A <i>string type</i> represents the set of string values. A string value is a (possibly empty) sequence of bytes. The number of bytes is called the length of the string and is never negative. Strings are immutable: once created, it is impossible to change the contents of a string. The predeclared string type is <code>string</code>;
HTML - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Thu Apr 11 20:22:45 GMT 2024 - 211.6K bytes - Viewed (0) -
src/cmd/cgo/gcc.go
func (p *Package) gccMachine() []string { switch goarch { case "amd64": if goos == "darwin" { return []string{"-arch", "x86_64", "-m64"} } return []string{"-m64"} case "arm64": if goos == "darwin" { return []string{"-arch", "arm64"} } case "386": return []string{"-m32"} case "arm": return []string{"-marm"} // not thumb case "s390":
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Nov 02 16:43:23 GMT 2023 - 97K bytes - Viewed (0) -
src/archive/tar/strconv.go
func (*parser) parseString(b []byte) string { if i := bytes.IndexByte(b, 0); i >= 0 { return string(b[:i]) } return string(b) } // formatString copies s into b, NUL-terminating if possible. func (f *formatter) formatString(b []byte, s string) { if len(s) > len(b) { f.err = ErrFieldTooLong } copy(b, s) if len(s) < len(b) { b[len(s)] = 0 }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Aug 01 14:28:42 GMT 2023 - 9K bytes - Viewed (0) -
src/archive/tar/common.go
func (h Header) allowedFormats() (format Format, paxHdrs map[string]string, err error) { format = FormatUSTAR | FormatPAX | FormatGNU paxHdrs = make(map[string]string) var whyNoUSTAR, whyNoPAX, whyNoGNU string var preferPAX bool // Prefer PAX over USTAR verifyString := func(s string, size int, name, paxKey string) { // NUL-terminator is optional for path and linkpath.
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Mar 15 16:01:50 GMT 2024 - 24.7K bytes - Viewed (2) -
src/bytes/buffer.go
// String returns the contents of the unread portion of the buffer // as a string. If the [Buffer] is a nil pointer, it returns "<nil>". // // To build strings more efficiently, see the strings.Builder type. func (b *Buffer) String() string { if b == nil { // Special case, useful in debugging. return "<nil>" } return string(b.buf[b.off:]) }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 17:10:31 GMT 2023 - 15.7K bytes - Viewed (0) -
src/cmd/cgo/internal/test/issue1435.go
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri Jul 28 21:31:41 GMT 2023 - 7.5K bytes - Viewed (0) -
src/cmd/cgo/internal/cgotest/overlaydir.go
func OverlayDir(dstRoot, srcRoot string) error { dstRoot = filepath.Clean(dstRoot) if err := os.MkdirAll(dstRoot, 0777); err != nil { return err } srcRoot, err := filepath.Abs(srcRoot) if err != nil { return err } return filepath.Walk(srcRoot, func(srcPath string, info os.FileInfo, err error) error { if err != nil || srcPath == srcRoot { return err
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon May 22 20:56:09 GMT 2023 - 1.7K bytes - Viewed (0) -
src/archive/zip/writer_test.go
if r.Comment != test.comment { t.Fatalf("Reader.Comment: got %v, want %v", r.Comment, test.comment) } } } func TestWriterUTF8(t *testing.T) { var utf8Tests = []struct { name string comment string nonUTF8 bool flags uint16 }{ { name: "hi, hello", comment: "in the world", flags: 0x8, }, { name: "hi, こんにちわ", comment: "in the world",
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Sep 15 19:04:06 GMT 2023 - 14.1K bytes - Viewed (0) -
src/cmd/addr2line/addr2line_test.go
cmd := testenv.Command(t, testenv.GoToolPath(t), "tool", "nm", dbgExePath) out, err := cmd.CombinedOutput() if err != nil { t.Fatalf("%v: %v\n%s", cmd, err, string(out)) } syms := make(map[string]string) scanner := bufio.NewScanner(bytes.NewReader(out)) for scanner.Scan() { f := strings.Fields(scanner.Text()) if len(f) < 3 { continue } syms[f[2]] = f[0] }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Feb 21 22:16:54 GMT 2024 - 3.8K bytes - Viewed (0)