Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for linspace (0.24 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. 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)
  3. 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)
  4. 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)
  5. 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)
  6. api/go1.txt

    pkg unicode, func IsNumber(int32) bool
    pkg unicode, func IsOneOf([]*RangeTable, int32) bool
    pkg unicode, func IsPrint(int32) bool
    pkg unicode, func IsPunct(int32) bool
    pkg unicode, func IsSpace(int32) bool
    pkg unicode, func IsSymbol(int32) bool
    pkg unicode, func IsTitle(int32) bool
    pkg unicode, func IsUpper(int32) bool
    pkg unicode, func SimpleFold(int32) int32
    pkg unicode, func To(int, int32) int32
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Aug 14 18:58:28 GMT 2013
    - 1.7M bytes
    - Viewed (1)
  7. 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)
Back to top