Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for ContainsRune (0.24 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 23 11:13:09 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 23 11:13:09 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  3. 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
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Dec 22 00:56:55 GMT 2023
    - 5.1K bytes
    - Viewed (0)
  4. 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 Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Mar 10 21:09:36 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  5. 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)
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Jun 28 15:08:11 GMT 2016
    - 13.6K bytes
    - Viewed (0)
  6. 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 Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Apr 17 03:38:55 GMT 2024
    - 14.3K bytes
    - Viewed (1)
  7. 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 Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Mar 11 11:55:34 GMT 2024
    - 35.6K bytes
    - Viewed (1)
  8. 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 {
    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)
  9. api/go1.txt

    pkg strconv, var ErrRange error
    pkg strconv, var ErrSyntax error
    pkg strings, func Contains(string, string) bool
    pkg strings, func ContainsAny(string, string) bool
    pkg strings, func ContainsRune(string, int32) bool
    pkg strings, func Count(string, string) int
    pkg strings, func EqualFold(string, string) bool
    pkg strings, func Fields(string) []string
    pkg strings, func FieldsFunc(string, func(int32) bool) []string
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Aug 14 18:58:28 GMT 2013
    - 1.7M bytes
    - Viewed (1)
Back to top