struct Goban::Segment

Overview

Represents a segment of QR Code data that holds its data bits and encoding type.

Defined in:

goban/segment.cr
goban/segment/mode.cr
goban/segment/segmenter.cr

Constant Summary

ALPHANUMERIC_CHARS = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' ', '$', '%', '*', '+', '-', '.', '/', ':'}

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(mode : Mode, text : String) #

[View source]

Class Method Detail

def self.alphanumeric(text : String) #

Shorthand method for creating a Alphanumeric mode segment.


[View source]
def self.byte(text : String) #

Shorthand method for creating a Byte mode segment.


[View source]
def self.count_total_bits(segments : Array(Segment), version : AbstractQR::Version) #

Count number of bits in the given list of segments.


[View source]
def self.kanji(text : String) #

Shorthand method for creating a Kanji mode segment.


[View source]
def self.numeric(text : String) #

Shorthand method for creating a Numeric mode segment.


[View source]

Instance Method Detail

def bit_size : Int32 #

[View source]
def char_count : Int32 #

[View source]
def mode : Mode #

[View source]
def text : String #

[View source]