Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for ContainsRune (0.22 sec)

  1. src/bytes/bytes.go

    func (as *asciiSet) contains(c byte) bool {
    	return (as[c/32] & (1 << (c % 32))) != 0
    }
    
    // containsRune is a simplified version of strings.ContainsRune
    // to avoid importing the strings package.
    // We avoid bytes.ContainsRune to avoid allocating a temporary copy of s.
    func containsRune(s string, r rune) bool {
    	for _, c := range s {
    		if c == r {
    			return true
    		}
    	}
    	return false
    }
    
    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)
  2. src/bytes/example_test.go

    	// true
    	// false
    	// false
    }
    
    func ExampleContainsRune() {
    	fmt.Println(bytes.ContainsRune([]byte("I like seafood."), 'f'))
    	fmt.Println(bytes.ContainsRune([]byte("I like seafood."), 'ö'))
    	fmt.Println(bytes.ContainsRune([]byte("去是伟大的!"), '大'))
    	fmt.Println(bytes.ContainsRune([]byte("去是伟大的!"), '!'))
    	fmt.Println(bytes.ContainsRune([]byte(""), '@'))
    	// Output:
    	// true
    	// false
    	// true
    	// true
    	// false
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  3. internal/etag/etag.go

    	// It contains the encrypted ETag value + an authentication
    	// code generated by the AEAD cipher.
    	//
    	// Here is an incorrect implementation of IsEncrypted:
    	//
    	//   return len(e) > 16 && !bytes.ContainsRune(e, '-')
    	//
    	// An encrypted ETag may contain some random bytes - e.g.
    	// and nonce value. This nonce value may contain a '-'
    	// just by its nature of being randomly generated.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Mar 10 21:09:36 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  4. chainable_api.go

    	return
    }
    
    // Omit specify fields that you want to ignore when creating, updating and querying
    func (db *DB) Omit(columns ...string) (tx *DB) {
    	tx = db.getInstance()
    
    	if len(columns) == 1 && strings.ContainsRune(columns[0], ',') {
    		tx.Statement.Omits = strings.FieldsFunc(columns[0], utils.IsValidDBNameChar)
    	} else {
    		tx.Statement.Omits = columns
    	}
    	return
    }
    
    // Where add conditions
    //
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Apr 17 03:38:55 GMT 2024
    - 14.3K bytes
    - Viewed (1)
  5. cmd/object-api-utils.go

    	}
    	// This is valid for AWS S3 but it will never
    	// work with file systems, we will reject here
    	// to return object name invalid rather than
    	// a cryptic error from the file system.
    	return !strings.ContainsRune(object, 0)
    }
    
    // checkObjectNameForLengthAndSlash -check for the validity of object name length and prefis as slash
    func checkObjectNameForLengthAndSlash(bucket, object string) error {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 11 11:55:34 GMT 2024
    - 35.6K bytes
    - Viewed (1)
Back to top