Module SkhcConfig.SectionSource

Operations on a section. No guarantees are made whether duplicated keys will all appear or only one of them will exist.

Sourcetype t

type representing a section.

Sourceval init : string -> (string * string) list -> t

init name keyvals creates a new section named name and having key/value pairs intialiazed with keyvals.

Sourceval assoc : string -> t -> string option

assoc key section tries to find the value associated with key in section. Returns None if no key key exists.

Sourceval name : t -> string

name section retuns the section's name.

Sourceval values : t -> (string * string) list

values section returns the key/value pairs in sections.

Sourceval to_channel : out_channel -> t -> unit

to_channel oc section prints a representation of section to oc.

Sourceval to_string : t -> string

to_string section returns a string representation of section.

  • since 0.2.0
Sourceval pp : Format.formatter -> t -> unit

to_channel format section prints a representation of section to format.