Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for FieldsFunc (0.07 sec)

  1. src/bytes/iter.go

    		}
    	}
    }
    
    // FieldsFuncSeq returns an iterator over substrings of s split around runs of
    // Unicode code points satisfying f(c).
    // The iterator yields the same strings that would be returned by FieldsFunc(s),
    // but without constructing the slice.
    func FieldsFuncSeq(s []byte, f func(rune) bool) iter.Seq[[]byte] {
    	return func(yield func([]byte) bool) {
    		start := -1
    		for i := 0; i < len(s); {
    			size := 1
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Aug 14 18:23:13 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  2. utils/utils_test.go

    	"errors"
    	"math"
    	"strings"
    	"testing"
    	"time"
    )
    
    func TestIsValidDBNameChar(t *testing.T) {
    	for _, db := range []string{"db", "dbName", "db_name", "db1", "1dbname", "db$name"} {
    		if fields := strings.FieldsFunc(db, IsValidDBNameChar); len(fields) != 1 {
    			t.Fatalf("failed to parse db name %v", db)
    		}
    	}
    }
    
    func TestCheckTruth(t *testing.T) {
    	checkTruthTests := []struct {
    		v   string
    		out bool
    	}{
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Aug 22 11:03:42 UTC 2024
    - 4.9K bytes
    - Viewed (0)
Back to top