Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for byte (0.12 sec)

  1. doc/go_spec.html

    </p>
    
    <pre>
    s := make([]byte, 2, 4)
    
    a0 := [0]byte(s)
    a1 := [1]byte(s[1:])     // a1[0] == s[1]
    a2 := [2]byte(s)         // a2[0] == s[0]
    a4 := [4]byte(s)         // panics: len([4]byte) > len(s)
    
    s0 := (*[0]byte)(s)      // s0 != nil
    s1 := (*[1]byte)(s[1:])  // &amp;s1[0] == &amp;s[1]
    s2 := (*[2]byte)(s)      // &amp;s2[0] == &amp;s[0]
    s4 := (*[4]byte)(s)      // panics: len([4]byte) > len(s)
    
    HTML
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Thu May 02 22:43:51 GMT 2024
    - 279.6K bytes
    - Viewed (0)
Back to top