bytes
Provides a scope for configuring the bytes
property.
The receiver of the builderAction is the bytes
property. Thus, inside the braces one can configure its options directly. This convenience function is intended to enable the configuration of multiple options within a single block. For example, the snippet:
val format = HexFormat {
bytes {
bytesPerLine = 16
bytesPerGroup = 8
byteSeparator = " "
}
}
is equivalent to:
val format = HexFormat {
bytes.bytesPerLine = 16
bytes.bytesPerGroup = 8
bytes.byteSeparator = " "
}
Refer to BytesHexFormat for details about the available format options, their impact on formatting and parsing results, and their default settings.
Since Kotlin
1.9Parameters
The function that is applied to the bytes
property, providing a scope for directly configuring its options.
Defines HexFormat.bytes of the format being built.
Refer to BytesHexFormat for details about the available format options, their impact on formatting and parsing results, and their default settings.