- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for ContainsRune (0.39 sec)
-
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
Registered: Tue Dec 30 11:13:12 UTC 2025 - Last Modified: Mon May 12 16:07:54 UTC 2025 - 16.5K bytes - Viewed (0) -
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 }
Registered: Tue Dec 30 11:13:12 UTC 2025 - Last Modified: Tue Sep 16 16:42:15 UTC 2025 - 35.5K bytes - Viewed (0) -
internal/handlers/proxy.go
return raddr } // GetSourceIP retrieves the IP from the request headers // and falls back to r.RemoteAddr when necessary. func GetSourceIP(r *http.Request) string { addr := GetSourceIPRaw(r) if strings.ContainsRune(addr, ':') { return "[" + addr + "]" } return addr
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Wed Feb 26 19:25:49 UTC 2025 - 5.4K bytes - Viewed (0) -
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.
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri May 16 14:27:42 UTC 2025 - 13.2K bytes - Viewed (0) -
api/go1.7.txt
pkg bytes, func ContainsAny([]uint8, string) bool pkg bytes, func ContainsRune([]uint8, int32) bool pkg bytes, method (*Reader) Reset([]uint8) pkg compress/flate, const HuffmanOnly = -2 pkg compress/flate, const HuffmanOnly ideal-int pkg context, func Background() Context pkg context, func TODO() Context pkg context, func WithCancel(Context) (Context, CancelFunc) pkg context, func WithDeadline(Context, time.Time) (Context, CancelFunc)
Registered: Tue Dec 30 11:13:12 UTC 2025 - Last Modified: Tue Jun 28 15:08:11 UTC 2016 - 13.6K bytes - Viewed (0) -
internal/hash/checksum.go
func NewChecksumWithType(alg ChecksumType, value string) *Checksum { if !alg.IsSet() { return nil } wantParts := 0 if strings.ContainsRune(value, '-') { valSplit := strings.Split(value, "-") if len(valSplit) != 2 { return nil } value = valSplit[0] nParts, err := strconv.Atoi(valSplit[1]) if err != nil { return nil
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Aug 22 14:15:21 UTC 2025 - 18.3K bytes - Viewed (0) -
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.IsInvalidDBNameChar) } else { tx.Statement.Omits = columns } return }
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Fri Sep 19 01:49:06 UTC 2025 - 14.8K bytes - Viewed (0) -
src/bytes/bytes_test.go
{[]byte("a☺b☻c☹d"), '☻', true}, {[]byte("aRegExp*"), '*', true}, } func TestContainsRune(t *testing.T) { for _, ct := range ContainsRuneTests { if ContainsRune(ct.b, ct.r) != ct.expected { t.Errorf("ContainsRune(%q, %q) = %v, want %v", ct.b, ct.r, !ct.expected, ct.expected) } } } func TestContainsFunc(t *testing.T) { for _, ct := range ContainsRuneTests {Registered: Tue Dec 30 11:13:12 UTC 2025 - Last Modified: Tue Dec 23 23:54:14 UTC 2025 - 62.9K bytes - Viewed (0) -
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 {
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Wed Jun 25 15:08:54 UTC 2025 - 37.3K bytes - Viewed (0) -
docs/debugging/xl-meta/main.go
if m.objSize == 0 { m.objSize = ei.V2Obj.Size } m.data = ei.V2Obj.EcM m.parity = ei.V2Obj.EcN if len(ei.V2Obj.PartNums) == 1 && !strings.ContainsRune(ei.V2Obj.MetaUsr.Etag, '-') { m.wantMD5 = ei.V2Obj.MetaUsr.Etag } if m.shards == 0 { m.shards = m.data + m.parity } idx = ei.V2Obj.EcIndex - 1Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Sun Sep 28 20:59:21 UTC 2025 - 40.4K bytes - Viewed (0)