Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Predicate (0.16 sec)

  1. 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
    	},
    	"IsValidRune",
    }
    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)
  2. src/bytes/bytes.go

    func LastIndexFunc(s []byte, f func(r rune) bool) int {
    	return lastIndexFunc(s, f, true)
    }
    
    // indexFunc is the same as IndexFunc except that if
    // truth==false, the sense of the predicate function is
    // inverted.
    func indexFunc(s []byte, f func(r rune) bool, truth bool) int {
    	start := 0
    	for start < len(s) {
    		wid := 1
    		r := rune(s[start])
    		if r >= utf8.RuneSelf {
    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)
Back to top