vCard

fun vCard(formattedName: String? = null, init: VCARD.() -> Unit = {}): VCard

Function that creates a vCard.

Each vCard is required to have at least one FN property so the value for the first FN property can be directly passed through this constructor.

val arthur = vCard("Arthur Dent")

If no value is passed then no FN property is added to the vCard. In this case the FN property is added during the export to be a valid vCard.

val emptyCard = vCard()

The FN property could also be added during creation.

val arthur = vCard {
fn("Arthur Dent")
}

To create vCard objects with properties the DSL syntax can be used:

val arthur = vCard {
fn("Arthur Dent")
n("Dent", "Arthur", "Philip")
categories("human", "male")
}

Author

Daniel Sturm

Parameters

formattedName

the value for the first FN property

init

function that is called to initialize the vCard


property that returns an empty vCard.

Each vCard is required to have at least one FN property so FN property can be added afterwards or is added during the export to be a valid vCard.

val emptyCard = vCard

Author

Daniel Sturm