Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for origin (0.14 sec)

  1. src/bytes/example_test.go

    	// ХЛЕБ
    }
    
    func ExampleToTitleSpecial() {
    	str := []byte("ahoj vývojári golang")
    	totitle := bytes.ToTitleSpecial(unicode.AzeriCase, str)
    	fmt.Println("Original : " + string(str))
    	fmt.Println("ToTitle : " + string(totitle))
    	// Output:
    	// Original : ahoj vývojári golang
    	// ToTitle : AHOJ VÝVOJÁRİ GOLANG
    }
    
    func ExampleToValidUTF8() {
    	fmt.Printf("%s\n", bytes.ToValidUTF8([]byte("abc"), []byte("\uFFFD")))
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  2. src/archive/tar/format.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package tar
    
    import "strings"
    
    // Format represents the tar archive format.
    //
    // The original tar format was introduced in Unix V7.
    // Since then, there have been multiple competing formats attempting to
    // standardize or extend the V7 format to overcome its limitations.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 11.3K bytes
    - Viewed (0)
  3. src/archive/zip/struct.go

    func (h *FileHeader) SetMode(mode fs.FileMode) {
    	h.CreatorVersion = h.CreatorVersion&0xff | creatorUnix<<8
    	h.ExternalAttrs = fileModeToUnixMode(mode) << 16
    
    	// set MSDOS attributes too, as the original zip does.
    	if mode&fs.ModeDir != 0 {
    		h.ExternalAttrs |= msdosDir
    	}
    	if mode&0200 == 0 {
    		h.ExternalAttrs |= msdosReadOnly
    	}
    }
    
    // isZip64 reports whether the file size exceeds the 32 bit limit
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 12.1K bytes
    - Viewed (0)
  4. src/bytes/reader.go

    // Len returns the number of bytes of the unread portion of the
    // slice.
    func (r *Reader) Len() int {
    	if r.i >= int64(len(r.s)) {
    		return 0
    	}
    	return int(int64(len(r.s)) - r.i)
    }
    
    // Size returns the original length of the underlying byte slice.
    // Size is the number of bytes available for reading via [Reader.ReadAt].
    // The result is unaffected by any method calls except [Reader.Reset].
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  5. src/bytes/bytes.go

    // returning the text before and after sep.
    // The found result reports whether sep appears in s.
    // If sep does not appear in s, cut returns s, nil, false.
    //
    // Cut returns slices of the original slice s, not copies.
    func Cut(s, sep []byte) (before, after []byte, found bool) {
    	if i := Index(s, sep); i >= 0 {
    		return s[:i], s[i+len(sep):], true
    	}
    	return s, nil, false
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
  6. src/archive/zip/zip_test.go

    	}
    	if got, want := fh2.ModifiedDate, fh.ModifiedDate; got != want {
    		t.Errorf("ModifiedDate: got %d, want %d\n", got, want)
    	}
    
    	if sysfh, ok := fi.Sys().(*FileHeader); !ok && sysfh != fh {
    		t.Errorf("Sys didn't return original *FileHeader")
    	}
    }
    
    func TestFileHeaderRoundTrip(t *testing.T) {
    	fh := &FileHeader{
    		Name:             "foo.txt",
    		UncompressedSize: 987654321,
    		ModifiedTime:     1234,
    		ModifiedDate:     5678,
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 19.5K bytes
    - Viewed (0)
  7. src/cmd/cgo/internal/cgotest/overlaydir.go

    			if err != nil {
    				return err
    			}
    			perm = info.Mode() & os.ModePerm
    		}
    
    		// Always copy directories (don't symlink them).
    		// If we add a file in the overlay, we don't want to add it in the original.
    		if info.IsDir() {
    			return os.MkdirAll(dstPath, perm|0200)
    		}
    
    		// If the OS supports symlinks, use them instead of copying bytes.
    		if err := os.Symlink(srcPath, dstPath); err == nil {
    			return nil
    		}
    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)
  8. src/bytes/buffer.go

    		n += int64(m)
    		if e == io.EOF {
    			return n, nil // e is EOF, so return nil explicitly
    		}
    		if e != nil {
    			return n, e
    		}
    	}
    }
    
    // growSlice grows b by n, preserving the original content of b.
    // If the allocation fails, it panics with ErrTooLarge.
    func growSlice(b []byte, n int) []byte {
    	defer func() {
    		if recover() != nil {
    			panic(ErrTooLarge)
    		}
    	}()
    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)
  9. src/archive/tar/common.go

    		h.Mode |= c_ISVTX
    	}
    	// If possible, populate additional fields from OS-specific
    	// FileInfo fields.
    	if sys, ok := fi.Sys().(*Header); ok {
    		// This FileInfo came from a Header (not the OS). Use the
    		// original Header to populate all remaining fields.
    		h.Uid = sys.Uid
    		h.Gid = sys.Gid
    		h.Uname = sys.Uname
    		h.Gname = sys.Gname
    		h.AccessTime = sys.AccessTime
    		h.ChangeTime = sys.ChangeTime
    		if sys.Xattrs != nil {
    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)
  10. src/cmd/cgo/gcc.go

    			// If the struct has 3 fields tv_sec, tv_usec, _pad1, then we
    			// still want to remove the tv_ prefix.
    			// The check for "orig_" here handles orig_eax in the
    			// x86 ptrace register sets, which otherwise have all fields
    			// with reg_ prefixes.
    			if strings.HasPrefix(n.Name, "orig_") || strings.HasPrefix(n.Name, "_") {
    				continue
    			}
    			i := strings.Index(n.Name, "_")
    			if i < 0 {
    				continue
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Nov 02 16:43:23 GMT 2023
    - 97K bytes
    - Viewed (0)
Back to top