Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,299 for runes (0.06 sec)

  1. staging/src/k8s.io/apimachinery/pkg/apis/meta/fuzzer/fuzzer.go

    		partLen = c.Rand.Intn(63) + 1 // len is [1, 63]
    	}
    
    	runes := make([]rune, partLen)
    	if partLen == 0 {
    		return string(runes)
    	}
    
    	runes[0] = validStartEnd[c.Rand.Intn(len(validStartEnd))].choose(c.Rand)
    	for i := range runes[1:] {
    		runes[i+1] = validMiddle[c.Rand.Intn(len(validMiddle))].choose(c.Rand)
    	}
    	runes[len(runes)-1] = validStartEnd[c.Rand.Intn(len(validStartEnd))].choose(c.Rand)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 03 15:12:26 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  2. src/regexp/onepass.go

    			if syntax.Flags(inst.Arg)&syntax.FoldCase != 0 {
    				r0 := inst.Rune[0]
    				runes = append(runes, r0, r0)
    				for r1 := unicode.SimpleFold(r0); r1 != r0; r1 = unicode.SimpleFold(r1) {
    					runes = append(runes, r1, r1)
    				}
    				slices.Sort(runes)
    			} else {
    				runes = append(runes, inst.Rune[0], inst.Rune[0])
    			}
    			onePassRunes[pc] = runes
    			inst.Next = make([]uint32, len(onePassRunes[pc])/2+1)
    			for i := range inst.Next {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:36:03 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  3. src/unicode/utf8/utf8_test.go

    		if n := runtimeRuneCount(ts); n != count {
    			t.Errorf("%q: len([]rune()) counted %d runes; got %d from RuneCountInString", ts, n, count)
    			break
    		}
    
    		runes := []rune(ts)
    		if n := len(runes); n != count {
    			t.Errorf("%q: []rune() has length %d; got %d from RuneCountInString", ts, n, count)
    			break
    		}
    		i := 0
    		for _, r := range ts {
    			if r != runes[i] {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 07 06:17:15 UTC 2022
    - 16.2K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/term/terminal.go

    		}
    		t.historyIndex++
    		runes := []rune(entry)
    		t.setLine(runes, len(runes))
    	case keyDown:
    		switch t.historyIndex {
    		case -1:
    			return
    		case 0:
    			runes := []rune(t.historyPending)
    			t.setLine(runes, len(runes))
    			t.historyIndex--
    		default:
    			entry, ok := t.history.NthPreviousEntry(t.historyIndex - 1)
    			if ok {
    				t.historyIndex--
    				runes := []rune(entry)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 22 17:16:14 UTC 2022
    - 22.5K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/text/unicode/norm/composition.go

    	bn := rb.rune[pos].pos
    	sz := utf8.EncodeRune(rb.byte[bn:], rune(r))
    	rb.rune[pos] = Properties{pos: bn, size: uint8(sz)}
    }
    
    // runeAt returns the rune at position n. It is used for Hangul and recomposition.
    func (rb *reorderBuffer) runeAt(n int) rune {
    	inf := rb.rune[n]
    	r, _ := utf8.DecodeRune(rb.byte[inf.pos : inf.pos+inf.size])
    	return r
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  6. src/unicode/letter.go

    				// is odd so we take the low bit from _case.
    				return rune(cr.Lo) + ((r-rune(cr.Lo))&^1 | rune(_case&1)), true
    			}
    			return r + delta, true
    		}
    		if r < rune(cr.Lo) {
    			hi = m
    		} else {
    			lo = m + 1
    		}
    	}
    	return r, false
    }
    
    // To maps the rune to the specified case: [UpperCase], [LowerCase], or [TitleCase].
    func To(_case int, r rune) rune {
    	r, _ = to(_case, r, CaseRanges)
    	return r
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 06 20:02:46 UTC 2023
    - 10K bytes
    - Viewed (0)
  7. src/unicode/utf8/utf8.go

    		return rune(p0&mask2)<<6 | rune(b1&maskx), 2
    	}
    	b2 := p[2]
    	if b2 < locb || hicb < b2 {
    		return RuneError, 1
    	}
    	if sz <= 3 {
    		return rune(p0&mask3)<<12 | rune(b1&maskx)<<6 | rune(b2&maskx), 3
    	}
    	b3 := p[3]
    	if b3 < locb || hicb < b3 {
    		return RuneError, 1
    	}
    	return rune(p0&mask4)<<18 | rune(b1&maskx)<<12 | rune(b2&maskx)<<6 | rune(b3&maskx), 4
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 02:00:36 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  8. src/regexp/syntax/regexp.go

    	case OpLiteral:
    		for _, r := range re.Rune {
    			escape(b, r, false)
    		}
    	case OpCharClass:
    		if len(re.Rune)%2 != 0 {
    			b.WriteString(`[invalid char class]`)
    			break
    		}
    		b.WriteRune('[')
    		if len(re.Rune) == 0 {
    			b.WriteString(`^\x00-\x{10FFFF}`)
    		} else if re.Rune[0] == 0 && re.Rune[len(re.Rune)-1] == unicode.MaxRune && len(re.Rune) > 2 {
    			// Contains 0 and MaxRune. Probably a negated class.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 16:41:51 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  9. src/fmt/doc.go

    that is, runes. (This differs from C's printf where the
    units are always measured in bytes.) Either or both of the flags
    may be replaced with the character '*', causing their values to be
    obtained from the next operand (preceding the one to format),
    which must be of type int.
    
    For most values, width is the minimum number of runes to output,
    padding the formatted form with spaces if necessary.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:56:20 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  10. src/runtime/string_test.go

    }
    
    var sinkInt int
    
    func BenchmarkRuneCount(b *testing.B) {
    	// Each sub-benchmark counts the runes in a string in a different way.
    	b.Run("lenruneslice", func(b *testing.B) {
    		for _, sd := range stringdata {
    			b.Run(sd.name, func(b *testing.B) {
    				for i := 0; i < b.N; i++ {
    					sinkInt += len([]rune(sd.data))
    				}
    			})
    		}
    	})
    	b.Run("rangeloop", func(b *testing.B) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 13 14:05:23 UTC 2022
    - 13.3K bytes
    - Viewed (0)
Back to top