Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for containsKey (4 sec)

  1. src/bytes/example_test.go

    	// true
    	// false
    	// true
    	// true
    }
    
    func ExampleContainsAny() {
    	fmt.Println(bytes.ContainsAny([]byte("I like seafood."), "fÄo!"))
    	fmt.Println(bytes.ContainsAny([]byte("I like seafood."), "去是伟大的."))
    	fmt.Println(bytes.ContainsAny([]byte("I like seafood."), ""))
    	fmt.Println(bytes.ContainsAny([]byte(""), ""))
    	// Output:
    	// true
    	// true
    	// false
    	// 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)
  2. cmd/object-api-utils.go

    			Bucket: bucket,
    			Object: object,
    		}
    	}
    	if runtime.GOOS == globalWindowsOSName {
    		// Explicitly disallowed characters on windows.
    		// Avoids most problematic names.
    		if strings.ContainsAny(object, `\:*?"|<>`) {
    			return ObjectNameInvalid{
    				Bucket: bucket,
    				Object: object,
    			}
    		}
    	}
    	return nil
    }
    
    // SlashSeparator - slash separator.
    const SlashSeparator = "/"
    
    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)
  3. src/bytes/bytes_test.go

    	{[]byte("aRegExp*"), ".(|)*+?^$[]", true},
    	{[]byte(dots + dots + dots), " ", false},
    }
    
    func TestContainsAny(t *testing.T) {
    	for _, ct := range ContainsAnyTests {
    		if ContainsAny(ct.b, ct.substr) != ct.expected {
    			t.Errorf("ContainsAny(%s, %s) = %v, want %v",
    				ct.b, ct.substr, !ct.expected, ct.expected)
    		}
    	}
    }
    
    var ContainsRuneTests = []struct {
    	b        []byte
    	r        rune
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  4. cmd/xl-storage.go

    func isValidVolname(volname string) bool {
    	if len(volname) < 3 {
    		return false
    	}
    
    	if runtime.GOOS == "windows" {
    		// Volname shouldn't have reserved characters in Windows.
    		return !strings.ContainsAny(volname, `\:*?\"<>|`)
    	}
    
    	return true
    }
    
    // xlStorage - implements StorageAPI interface.
    type xlStorage struct {
    	// Indicate of NSScanner is in progress in this disk
    	scanning int32
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 84.7K bytes
    - Viewed (0)
  5. src/bytes/bytes.go

    		s = s[i+len(sep):]
    	}
    }
    
    // Contains reports whether subslice is within b.
    func Contains(b, subslice []byte) bool {
    	return Index(b, subslice) != -1
    }
    
    // ContainsAny reports whether any of the UTF-8-encoded code points in chars are within b.
    func ContainsAny(b []byte, chars string) bool {
    	return IndexAny(b, chars) >= 0
    }
    
    // ContainsRune reports whether the rune is contained in the UTF-8-encoded byte slice b.
    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)
  6. docs/debugging/xl-meta/main.go

    						switch {
    						case r >= 'a' && r <= 'z':
    							return r
    						case r >= 'A' && r <= 'Z':
    							return r
    						case r >= '0' && r <= '9':
    							return r
    						case strings.ContainsAny(string(r), "+=-_()!@."):
    							return r
    						default:
    							return '_'
    						}
    					}, file)
    				}
    				err := data.files(func(name string, data []byte) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 17:56:22 GMT 2024
    - 20.2K bytes
    - Viewed (1)
  7. cmd/metacache-marker.go

    func (o listPathOptions) encodeMarker(marker string) string {
    	if o.ID == "" {
    		// Mark as returning listing...
    		return fmt.Sprintf("%s[minio_cache:%s,return:]", marker, markerTagVersion)
    	}
    	if strings.ContainsAny(o.ID, "[:,") {
    		internalLogIf(context.Background(), fmt.Errorf("encodeMarker: uuid %s contained invalid characters", o.ID))
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  8. src/cmd/cgo/ast.go

    				if s.Name != nil {
    					error_(s.Path.Pos(), `cannot rename import "C"`)
    				}
    				cg := s.Doc
    				if cg == nil && len(decl.Specs) == 1 {
    					cg = decl.Doc
    				}
    				if cg != nil {
    					if strings.ContainsAny(abspath, "\r\n") {
    						// This should have been checked when the file path was first resolved,
    						// but we double check here just to be sure.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jun 07 16:54:27 GMT 2023
    - 14.3K bytes
    - Viewed (0)
Back to top