This library has been archived and will be receiving no further updates. Please switch to JakeWharton/picnic for a replacement library.
A small DSL for generating tables in ASCII or HTML formats
val table = krow {
cell("col1", "row1") { content = "1-1" }
cell("col1", "row2") { content = "1-2" }
cell("col2", "row1") { content = "2-1" }
cell("col2", "row2") { content = "2-2" }
cell("col3", "row1") { content = "3-1" }
cell("col3", "row2") { content = "3-2" }
table {
wrapTextAt = 30
horizontalAlignment = HorizontalAlignment.CENTER
verticalAlignment = VerticalAlignment.TOP
}
}
Platform |
---|
Android |
JVM |
iOS |
JS |
repositories {
mavenCentral()
}
// for plain JVM or Android projects
dependencies {
implementation("io.github.copper-leaf:krow-core:{{site.version}}")
}
// for multiplatform projects
kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation("io.github.copper-leaf:krow-core:{{site.version}}")
}
}
}
}
See the website for detailed documentation and usage instructions.
Krow is licensed under the BSD 3-Clause License, see LICENSE.md.