Companion

object Companion

Properties

Link copied to clipboard

The set of all legal characters in alphanumeric mode, where each character value maps to the index in the string.

Functions

Link copied to clipboard
fun getTotalBits(segs: MutableList<QrSegment>, version: Int): Int

Calculates the number of bits needed to encode the given segments at the given version. Returns a non-negative number if successful. Otherwise returns -1 if a segment has too many characters to fit its length field, or the total bits exceeds Integer.MAX_VALUE.

Link copied to clipboard

Tests whether the specified string can be encoded as a segment in alphanumeric mode. A string is encodable iff each character is in the following set: 0 to 9, A to Z (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon.

Link copied to clipboard

Tests whether the specified string can be encoded as a segment in numeric mode. A string is encodable iff each character is in the range 0 to 9.

Link copied to clipboard

Returns a segment representing the specified text string encoded in alphanumeric mode. The characters allowed are: 0 to 9, A to Z (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon.

Link copied to clipboard

Returns a segment representing the specified binary data encoded in byte mode. All input byte arrays are acceptable.

Link copied to clipboard
fun makeEci(assignVal: Int): QrSegment

Returns a segment representing an Extended Channel Interpretation (ECI) designator with the specified assignment value.

Link copied to clipboard

Returns a segment representing the specified string of decimal digits encoded in numeric mode.

Link copied to clipboard

Returns a list of zero or more segments to represent the specified Unicode text string. The result may use various segment modes and switch modes to optimize the length of the bit stream.