MCPcopy Create free account
hub / github.com/boombuler/barcode / shouldUseATable

Function shouldUseATable

code128/encode.go:50–67  ·  view source on GitHub ↗
(nextRunes []rune, curEncoding byte)

Source from the content-addressed store, hash-verified

48}
49
50func shouldUseATable(nextRunes []rune, curEncoding byte) bool {
51 nextRune := nextRunes[0]
52 if !tableContainsRune(bTable, nextRune) || curEncoding == startASymbol {
53 return tableContainsRune(aTable, nextRune)
54 }
55 if curEncoding == 0 {
56 for _, r := range nextRunes {
57 if tableContainsRune(abTable, r) {
58 continue
59 }
60 if strings.ContainsRune(aOnlyTable, r) {
61 return true
62 }
63 break
64 }
65 }
66 return false
67}
68
69func getCodeIndexList(content []rune) *utils.BitList {
70 result := new(utils.BitList)

Callers 2

Test_Issue16Function · 0.85
getCodeIndexListFunction · 0.85

Calls 1

tableContainsRuneFunction · 0.85

Tested by 1

Test_Issue16Function · 0.68