Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 63 for TrimSpace (0.21 sec)

  1. src/bytes/bytes_test.go

    		if !Equal(got, []byte(tc.out)) {
    			t.Errorf("ToValidUTF8(%q, %q) = %q; want %q", tc.in, tc.repl, got, tc.out)
    		}
    	}
    }
    
    func TestTrimSpace(t *testing.T) { runStringTests(t, TrimSpace, "TrimSpace", trimSpaceTests) }
    
    type RepeatTest struct {
    	in, out string
    	count   int
    }
    
    var longString = "a" + string(make([]byte, 1<<16)) + "z"
    
    var RepeatTests = []RepeatTest{
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  2. src/bytes/bytes.go

    			r, n = utf8.DecodeLastRune(s)
    		}
    		if !containsRune(cutset, r) {
    			break
    		}
    		s = s[:len(s)-n]
    	}
    	return s
    }
    
    // TrimSpace returns a subslice of s by slicing off all leading and
    // trailing white space, as defined by Unicode.
    func TrimSpace(s []byte) []byte {
    	// Fast path for ASCII: look for the first ASCII non-space byte
    	start := 0
    	for ; start < len(s); start++ {
    		c := s[start]
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
  3. migrator/migrator.go

    func (m Migrator) MigrateColumn(value interface{}, field *schema.Field, columnType gorm.ColumnType) error {
    	if field.IgnoreMigration {
    		return nil
    	}
    
    	// found, smart migrate
    	fullDataType := strings.TrimSpace(strings.ToLower(m.DB.Migrator().FullDataTypeOf(field).SQL))
    	realDataType := strings.ToLower(columnType.DatabaseTypeName())
    
    	var (
    		alterColumn bool
    		isSameType  = fullDataType == realDataType
    	)
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  4. finisher_api.go

    		defer delete(tx.Statement.Clauses, "SELECT")
    	}
    
    	if len(tx.Statement.Selects) == 0 {
    		tx.Statement.AddClause(clause.Select{Expression: clause.Expr{SQL: "count(*)"}})
    	} else if !strings.HasPrefix(strings.TrimSpace(strings.ToLower(tx.Statement.Selects[0])), "count(") {
    		expr := clause.Expr{SQL: "count(*)"}
    
    		if len(tx.Statement.Selects) == 1 {
    			dbName := tx.Statement.Selects[0]
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 22.7K bytes
    - Viewed (0)
  5. docs/debugging/xl-meta/main.go

    				b0 := ""
    				if ndjson {
    					b, _ := json.Marshal(file)
    					b0 = fmt.Sprintf("%s: ", string(b))
    				}
    				b, err := decode(r, file)
    				if err != nil {
    					return err
    				}
    				b = bytes.TrimSpace(b)
    				if !ndjson {
    					b = bytes.TrimFunc(b, func(r rune) bool {
    						return r == '{' || r == '}' || r == '\n' || r == '\r'
    					})
    				}
    
    				toPrint = append(toPrint, fmt.Sprintf("%s%s", b0, string(b)))
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 24 17:56:22 GMT 2024
    - 20.2K bytes
    - Viewed (1)
  6. src/cmd/cgo/gcc.go

    			continue
    		}
    
    		line = strings.TrimSpace(line[8:])
    
    		var key, val string
    		spaceIndex := strings.Index(line, " ")
    		tabIndex := strings.Index(line, "\t")
    
    		if spaceIndex == -1 && tabIndex == -1 {
    			continue
    		} else if tabIndex == -1 || (spaceIndex != -1 && spaceIndex < tabIndex) {
    			key = line[0:spaceIndex]
    			val = strings.TrimSpace(line[spaceIndex:])
    		} else {
    			key = line[0:tabIndex]
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Nov 02 16:43:23 GMT 2023
    - 97K bytes
    - Viewed (0)
  7. cmd/iam-store.go

    }
    
    // converts a mapped policy into a slice of distinct policies
    func (mp MappedPolicy) toSlice() []string {
    	var policies []string
    	for _, policy := range strings.Split(mp.Policies, ",") {
    		if strings.TrimSpace(policy) == "" {
    			continue
    		}
    		policies = append(policies, policy)
    	}
    	return policies
    }
    
    func (mp MappedPolicy) policySet() set.StringSet {
    	return set.CreateStringSet(mp.toSlice()...)
    }
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Apr 27 10:04:10 GMT 2024
    - 75.2K bytes
    - Viewed (2)
  8. cmd/object-multipart-handlers.go

    		return
    	}
    
    	// Read escaped copy source path to check for parameters.
    	cpSrcPath := r.Header.Get(xhttp.AmzCopySource)
    	var vid string
    	if u, err := url.Parse(cpSrcPath); err == nil {
    		vid = strings.TrimSpace(u.Query().Get(xhttp.VersionID))
    		// Note that url.Parse does the unescaping
    		cpSrcPath = u.Path
    	}
    
    	srcBucket, srcObject := path2BucketObject(cpSrcPath)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Mar 28 17:44:56 GMT 2024
    - 39K bytes
    - Viewed (0)
  9. cmd/data-usage-cache.go

    func (d *dataUsageCache) StringAll() string {
    	// Remove bloom filter from print.
    	s := fmt.Sprintf("info:%+v\n", d.Info)
    	for k, v := range d.Cache {
    		s += fmt.Sprintf("\t%v: %+v\n", k, v)
    	}
    	return strings.TrimSpace(s)
    }
    
    // String returns a human readable representation of the string.
    func (h dataUsageHash) String() string {
    	return string(h)
    }
    
    // Key returns the key.
    func (h dataUsageHash) Key() string {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 22 17:49:30 GMT 2024
    - 41.4K bytes
    - Viewed (1)
  10. cmd/admin-handlers.go

    		return
    	}
    
    	sizeStr := r.Form.Get(peerRESTSize)
    	durationStr := r.Form.Get(peerRESTDuration)
    	concurrentStr := r.Form.Get(peerRESTConcurrent)
    	storageClass := strings.TrimSpace(r.Form.Get(peerRESTStorageClass))
    	customBucket := strings.TrimSpace(r.Form.Get(peerRESTBucket))
    	autotune := r.Form.Get("autotune") == "true"
    	noClear := r.Form.Get("noclear") == "true"
    	enableSha256 := r.Form.Get("enableSha256") == "true"
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 21 11:43:18 GMT 2024
    - 97.3K bytes
    - Viewed (2)
Back to top