The set of properties. Keys are case insensitive.
Procs
proc len*(p: Props): int
- Returns the number of properties Source Edit
proc `[]`*(p: Props; name: string): string
- Returns the property named name or empty string. If you need to know, if the property was set, use contains. Source Edit
proc add*(p: var Props; n, v: string; overwrite = false; delimiter = ",")
- Sets the property named n to the value v. If the property was already set, then overwrite it's value if overwrite == true or append it using delimiter to the previous value. Source Edit
proc `[]=`*(p: var Props; n, v: string)
- Sets the property n to the value v. Source Edit
proc contains*(p: Props; name: string): bool
- Checks if the property named name exists. Source Edit
proc newProps*(vals: varargs[tuple[name: string, value: string]]; overwrite = false; delimiter = ","): Props
- Creates new properties set filled with vals. Parameters overwrite and delimiter works as in the add function. Source Edit
proc toSeq*(p: Props): seq[(string, string)]
- Converts properties set p to the sequence of key/value pairs Source Edit
proc clear*(p: var Props)
- Clears mutable properties set p Source Edit
proc isNil*(p: Props): bool
- Checks Source Edit
proc toStringTable*(p: Props; t: StringTableRef)
- Source Edit
proc asStringTable*(p: Props): StringTableRef
- Source Edit