Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for linspace (0.19 sec)

  1. src/bytes/bytes.go

    	setBits := uint8(0)
    	for i := 0; i < len(s); i++ {
    		r := s[i]
    		setBits |= r
    		isSpace := int(asciiSpace[r])
    		n += wasSpace & ^isSpace
    		wasSpace = isSpace
    	}
    
    	if setBits >= utf8.RuneSelf {
    		// Some runes in the input slice are not ASCII.
    		return FieldsFunc(s, unicode.IsSpace)
    	}
    
    	// ASCII fast path
    	a := make([][]byte, n)
    	na := 0
    	fieldStart := 0
    	i := 0
    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)
  2. cmd/signature-v4-utils.go

    // in http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
    func signV4TrimAll(input string) string {
    	// Compress adjacent spaces (a space is determined by
    	// unicode.IsSpace() internally here) to one space and return
    	return strings.Join(strings.Fields(input), " ")
    }
    
    // checkMetaHeaders will check if the metadata from header/url is the same with the one from signed headers
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Jan 31 18:56:45 GMT 2024
    - 9K bytes
    - Viewed (0)
  3. src/bufio/scan.go

    	if atEOF {
    		return len(data), dropCR(data), nil
    	}
    	// Request more data.
    	return 0, nil, nil
    }
    
    // isSpace reports whether the character is a Unicode white space character.
    // We avoid dependency on the unicode package, but check validity of the implementation
    // in the tests.
    func isSpace(r rune) bool {
    	if r <= '\u00FF' {
    		// Obvious ASCII ones: \t through \r plus space. Plus two Latin-1 oddballs.
    		switch r {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  4. src/bufio/scan_test.go

    // Test white space table matches the Unicode definition.
    func TestSpace(t *testing.T) {
    	for r := rune(0); r <= utf8.MaxRune; r++ {
    		if IsSpace(r) != unicode.IsSpace(r) {
    			t.Fatalf("white space property disagrees: %#U should be %t", r, unicode.IsSpace(r))
    		}
    	}
    }
    
    var scanTests = []string{
    	"",
    	"a",
    	"¼",
    	"☹",
    	"\x81",   // UTF-8 error
    	"\uFFFD", // correctly encoded RuneError
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Sep 22 16:22:42 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  5. src/bytes/bytes_test.go

    			}
    		}
    	}
    }
    
    type predicate struct {
    	f    func(r rune) bool
    	name string
    }
    
    var isSpace = predicate{unicode.IsSpace, "IsSpace"}
    var isDigit = predicate{unicode.IsDigit, "IsDigit"}
    var isUpper = predicate{unicode.IsUpper, "IsUpper"}
    var isValidRune = predicate{
    	func(r rune) bool {
    		return r != utf8.RuneError
    	},
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  6. src/cmd/cgo/gcc.go

    	f.NoCallbacks = make(map[string]bool)
    	f.NoEscapes = make(map[string]bool)
    	for _, line := range linesIn {
    		l := strings.TrimSpace(line)
    		if len(l) < 5 || l[:4] != "#cgo" || !unicode.IsSpace(rune(l[4])) {
    			linesOut = append(linesOut, line)
    		} else {
    			linesOut = append(linesOut, "")
    
    			// #cgo (nocallback|noescape) <function name>
    			if fields := strings.Fields(l); len(fields) == 3 {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Nov 02 16:43:23 GMT 2023
    - 97K bytes
    - Viewed (0)
  7. src/bufio/export_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package bufio
    
    // Exported for testing only.
    import (
    	"unicode/utf8"
    )
    
    var IsSpace = isSpace
    
    const DefaultBufSize = defaultBufSize
    
    func (s *Scanner) MaxTokenSize(n int) {
    	if n < utf8.UTFMax || n > 1e9 {
    		panic("bad max token size")
    	}
    	if n < len(s.buf) {
    		s.buf = make([]byte, n)
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Nov 02 17:17:44 GMT 2017
    - 597 bytes
    - Viewed (0)
Back to top