Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 106 for nul (0.02 sec)

  1. src/cmd/vendor/golang.org/x/sys/unix/syscall.go

    )
    
    // ByteSliceFromString returns a NUL-terminated slice of bytes
    // containing the text of s. If s contains a NUL byte at any
    // location, it returns (nil, EINVAL).
    func ByteSliceFromString(s string) ([]byte, error) {
    	if strings.IndexByte(s, 0) != -1 {
    		return nil, EINVAL
    	}
    	a := make([]byte, len(s)+1)
    	copy(a, s)
    	return a, nil
    }
    
    // BytePtrFromString returns a pointer to a NUL-terminated array of
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  2. src/syscall/syscall.go

    // containing the text of s. If s contains a NUL byte at any
    // location, it returns (nil, [EINVAL]).
    func ByteSliceFromString(s string) ([]byte, error) {
    	if bytealg.IndexByteString(s, 0) != -1 {
    		return nil, EINVAL
    	}
    	a := make([]byte, len(s)+1)
    	copy(a, s)
    	return a, nil
    }
    
    // StringBytePtr returns a pointer to a NUL-terminated array of bytes.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  3. src/archive/tar/strconv.go

    	err error // Last error seen
    }
    
    // parseString parses bytes as a NUL-terminated C-style string.
    // If a NUL byte is not found then the whole slice is returned as a string.
    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) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 01 14:28:42 UTC 2023
    - 9K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/sys/windows/syscall.go

    package windows // import "golang.org/x/sys/windows"
    
    import (
    	"bytes"
    	"strings"
    	"syscall"
    	"unsafe"
    )
    
    // ByteSliceFromString returns a NUL-terminated slice of bytes
    // containing the text of s. If s contains a NUL byte at any
    // location, it returns (nil, syscall.EINVAL).
    func ByteSliceFromString(s string) ([]byte, error) {
    	if strings.IndexByte(s, 0) != -1 {
    		return nil, syscall.EINVAL
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/sys/plan9/syscall.go

    )
    
    // ByteSliceFromString returns a NUL-terminated slice of bytes
    // containing the text of s. If s contains a NUL byte at any
    // location, it returns (nil, EINVAL).
    func ByteSliceFromString(s string) ([]byte, error) {
    	if strings.IndexByte(s, 0) != -1 {
    		return nil, EINVAL
    	}
    	a := make([]byte, len(s)+1)
    	copy(a, s)
    	return a, nil
    }
    
    // BytePtrFromString returns a pointer to a NUL-terminated array of
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  6. src/cmd/go/internal/base/path.go

    }
    
    // IsNull reports whether the path is a common name for the null device.
    // It returns true for /dev/null on Unix, or NUL (case-insensitive) on Windows.
    func IsNull(path string) bool {
    	if path == os.DevNull {
    		return true
    	}
    	if runtime.GOOS == "windows" {
    		if strings.EqualFold(path, "NUL") {
    			return true
    		}
    	}
    	return false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 20 19:17:27 UTC 2023
    - 2K bytes
    - Viewed (0)
  7. src/make.bat

    if "x%GOR...
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 22:16:54 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  8. src/syscall/exec_unix.go

    // SlicePtrFromStrings converts a slice of strings to a slice of
    // pointers to NUL-terminated byte arrays. If any string contains
    // a NUL byte, it returns (nil, [EINVAL]).
    func SlicePtrFromStrings(ss []string) ([]*byte, error) {
    	n := 0
    	for _, s := range ss {
    		if bytealg.IndexByteString(s, 0) != -1 {
    			return nil, EINVAL
    		}
    		n += len(s) + 1 // +1 for NUL
    	}
    	bb := make([]*byte, len(ss)+1)
    	b := make([]byte, n)
    	n = 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  9. src/syscall/syscall_bsd.go

    		// Some BSDs include the trailing NUL in the length, whereas
    		// others do not. Work around this by subtracting the leading
    		// family and len. The path is then scanned to see if a NUL
    		// terminator still exists within the length.
    		n := int(pp.Len) - 2 // subtract leading Family, Len
    		for i := 0; i < n; i++ {
    			if pp.Path[i] == 0 {
    				// found early NUL; assume Len included the NUL
    				// or was overestimating.
    				n = i
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 07 10:34:48 UTC 2023
    - 13.6K bytes
    - Viewed (0)
  10. src/archive/tar/reader.go

    				hdr.Format = FormatUnknown // Non-ASCII characters in block.
    			}
    			nul := func(b []byte) bool { return int(b[len(b)-1]) == 0 }
    			if !(nul(v7.size()) && nul(v7.mode()) && nul(v7.uid()) && nul(v7.gid()) &&
    				nul(v7.modTime()) && nul(ustar.devMajor()) && nul(ustar.devMinor())) {
    				hdr.Format = FormatUnknown // Numeric fields must end in NUL
    			}
    		case format.has(formatSTAR):
    			star := tr.blk.toSTAR()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 01:59:14 UTC 2024
    - 26.8K bytes
    - Viewed (0)
Back to top