func isValidMetadataKey(key string) bool {
	for i := 0; i < len(key); i++ {
		if i != 0 { // Most of case i != 0
			if !isValidMetadataKeyChar(key[i]) {
				return false
			}
			// Coming key is valid
		} else { // i == 0
			if !isValidMetadataKeyFirstChar(key[i]) {
				return false
			}
			// First key is valid
		}
	}

	return true
}
// isValidMetadataKey checks if the given string is a valid metadata key for Azure.
// For Azure, metadata key must adhere to the naming rules for C# identifiers.
// As testing, reserved keyworkds for C# identifiers are also valid metadata key. (e.g. this, int)
// TODO: consider to use "[A-Za-z_]\w*" to replace this implementation, after ensuring the complexity is O(N).
isValidMetadataKey checks if the given string is a valid metadata key for Azure.
For Azure, metadata key must adhere to the naming rules for C# identifiers.
As testing, reserved keyworkds for C# identifiers are also valid metadata key.
TODO: consider to use "[A-Za-z_]\w*" to replace this implementation, after ensuring the complexity is O(N).
// isValidMetadataKey checks if the given string is a valid metadata key for Azure . // For Azure metadata key must adhere to the naming rules for C# identifiers . // As testing reserved keyworkds for C# identifiers are also valid metadata key . ( e . g . this int ) // TODO : consider to use " [ A - Za - z_ ] \ w * " to replace this implementation after ensuring the complexity is O ( N ) .
func isValidMetadataKey(key string) bool {
	for i := 0; i < len(key); i++ {
		if i != 0 { 
			if !isValidMetadataKeyChar(key[i]) {
				return false
			}
		} else { 
			if !isValidMetadataKeyFirstChar(key[i]) {
				return false
			}
		}
	}
	return true
}
func isValidMetadataKey ( key string ) bool { for i := 0 ; i < len ( key ) ; i ++ { if i != 0 { if ! isValidMetadataKeyChar ( key [ i ] ) { return false } } else { if ! isValidMetadataKeyFirstChar ( key [ i ] ) { return false } } } return true }
isValidMetadataKey checks if the given string is a valid metadata key for Azure.
isValidMetadataKey checks if the given string is a valid metadata key for Azure .
// Most of case i != 0 // Coming key is valid // i == 0 // First key is valid