Property definitions

ini $ IniSection :: defaultinit
# A section in a IniFile
#
# Section properties values are strings associated keys.
# Sections cannot be nested.
#
# ~~~
# var section = new IniSection("section")
# section["key1"] = "value1"
# section["key2"] = "value2"
#
# assert section.length == 2
# assert section["key1"] == "value1"
# assert section["not.found"] == null
# assert section.join(", ", ": ") == "key1: value1, key2: value2"
#
# var i = 0
# for key, value in section do
#	assert key.has_prefix("key")
#	assert value.has_prefix("value")
#	i += 1
# end
# assert i == 2
# ~~~
class IniSection
	super HashMap[String, nullable String]

	# Section name
	var name: String

	# Get the value associated with `key`
	#
	# Returns `null` if the `key` is not found.
	#
	# ~~~
	# var section = new IniSection("section")
	# section["key"] = "value1"
	# section["sub.key"] = "value2"
	#
	# assert section["key"] == "value1"
	# assert section["sub.key"] == "value2"
	# assert section["not.found"] == null
	# ~~~
	redef fun [](key) do
		if not has_key(key) then return null
		return super
	end
end
lib/ini/ini.nit:507,1--553,3