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 unset. Minimum value (Sort start value)maxValue- default unset. 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 = 3u, maxSize = 6u, 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 = 3u, maxSize = 6u, 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. Transport uses the LENGTH_DELIMITED wire type. Malformed UTF-8 is rejected during decoding. Writes reject lone UTF-16 surrogates, including strings nested in collections and embedded values. Valid supplementary characters, NUL characters and the explicit replacement character U+FFFD are preserved.
String representation
Section titled “String representation”String
