Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 114 for IsSpace (0.05 sec)

  1. src/bufio/scan.go

    	}
    	// 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 {
    		case ' ', '\t', '\n', '\v', '\f', '\r':
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Wed May 21 18:05:26 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  2. src/bufio/scan_test.go

    )
    
    const smallMaxTokenSize = 256 // Much smaller for more efficient testing.
    
    // 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",
    	"¼",
    	"☹",
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Fri Sep 22 16:22:42 UTC 2023
    - 14.3K bytes
    - Viewed (0)
  3. 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
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Wed Sep 03 14:04:47 UTC 2025
    - 35.5K bytes
    - Viewed (0)
  4. cmd/generic-handlers.go

    			i++
    		}
    
    		// Trim whitespace of segment
    		segmentStart, segmentEnd := start, i
    		for segmentStart < segmentEnd && unicode.IsSpace(rune(path[segmentStart])) {
    			segmentStart++
    		}
    		for segmentEnd > segmentStart && unicode.IsSpace(rune(path[segmentEnd-1])) {
    			segmentEnd--
    		}
    
    		// Check for ".." or "."
    		switch {
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 20.7K bytes
    - Viewed (1)
  5. src/bytes/example_test.go

    	// "of"
    	// "spaces"
    }
    
    func ExampleFieldsFuncSeq() {
    	text := []byte("The quick brown fox")
    	fmt.Println("Split on whitespace(similar to FieldsSeq):")
    	for word := range bytes.FieldsFuncSeq(text, unicode.IsSpace) {
    		fmt.Printf("%q\n", word)
    	}
    
    	mixedText := []byte("abc123def456ghi")
    	fmt.Println("\nSplit on digits:")
    	for word := range bytes.FieldsFuncSeq(mixedText, unicode.IsDigit) {
    		fmt.Printf("%q\n", word)
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Mon May 12 16:07:54 UTC 2025
    - 16.5K bytes
    - Viewed (0)
  6. src/test/java/jcifs/dcerpc/msrpc/netdfsTest.java

            netdfs.DfsInfo1 info1 = new netdfs.DfsInfo1();
            info1.entry_path = "test_path";
    
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            // Create buffer for encoding - initially allocate some space
            byte[] encodeBuffer = new byte[1024];
            NdrBuffer dst = new NdrBuffer(encodeBuffer, 0);
            info1.encode(dst);
    
            ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 30.9K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/AllocInfoTest.java

            @ParameterizedTest
            @DisplayName("Should handle various capacity and free space values")
            @CsvSource({ "0, 0", "1024, 512", "1048576, 524288", "1073741824, 536870912", "9223372036854775807, 4611686018427387903", // Long.MAX_VALUE and half
                    "-1, -1", // Negative values (edge case)
                    "100, 200" // Free space greater than capacity (edge case)
            })
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.8K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/fess/app/web/api/admin/stats/ApiAdminStatsAction.java

            }
    
            /** The percentage of used space on the filesystem. */
            public short percent;
            /** Used space in bytes */
            public long used;
            /** Filesystem path */
            public String path;
            /** Free space in bytes */
            public long free;
            /** Total space in bytes */
            public long total;
            /** Usable space in bytes */
            public long usable;
        }
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Jul 17 08:28:31 UTC 2025
    - 19.7K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/fscc/FileFsSizeInformationTest.java

                    "1000, 500, 8, 4096", // 4K sectors
                    "1000, 500, 16, 4096", // Large sectors and allocation
                    "1000, 0, 8, 512", // No free space
                    "1000, 1000, 8, 512" // All space free
            })
            void shouldDecodeVariousSectorConfigurations(long alloc, long free, int sectPerAlloc, int bytesPerSect)
                    throws SMBProtocolDecodingException {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 25.9K bytes
    - Viewed (0)
  10. src/bytes/buffer.go

    		return l, true
    	}
    	return 0, false
    }
    
    // grow grows the buffer to guarantee space for n more bytes.
    // It returns the index where bytes should be written.
    // If the buffer can't grow it will panic with ErrTooLarge.
    func (b *Buffer) grow(n int) int {
    	m := b.Len()
    	// If buffer is empty, reset to recover space.
    	if m == 0 && b.off != 0 {
    		b.Reset()
    	}
    	// Try to grow by means of a reslice.
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Mon May 19 17:38:56 UTC 2025
    - 16K bytes
    - Viewed (0)
Back to top