String
Represents textual values.
- Kotlin Definition:
StringDefinition - Kotlin Value :
String - Maryk Yaml Definition:
String
Usage options
Section titled “Usage options”- Value
- Map Key or Value
- Inside List/Set
Validation Options
Section titled “Validation Options”required- default truefinal- default falseunique- default falseregEx- regular expression to match complete value againstminSize- minimum length of the string. Default unset.maxSize- maximum length of the string. Default unset.minValue- default false. Minimum value (Sort start value)maxValue- default false. Maximum value (Sort end value)
Other options
Section titled “Other options”default- the default value to be used if value was not set.
Examples
Section titled “Examples”Example of a String property definition for use within a Model
val codeName by string( index = 1u, required = true, final = true, unique = true, minSize = 3, maxSize = 6, default = "baa", minValue = "aab", maxValue = "ddda", regEx = "[abcd]{3,4}")Example of a separate String property definition
val def = StringDefinition( required = true, final = true, unique = true, minSize = 3, maxSize = 6, default = "baa", minValue = "aab", maxValue = "ddda", regEx = "[abcd]{3,4}")Storage/Transport Byte representation
Section titled “Storage/Transport Byte representation”Strings are stored as UTF-8 encoded bytes. With transport the LENGTH_DELIMITED wiretype is used
String representation
Section titled “String representation”String