lib/barby/barcode/code_128.rb
def control_before_lowercase?(str)
        ctrl = str =~ CTRL_RE
        char = str =~ LOWR_RE

        ctrl && (!char || ctrl < char)
      end
#Test str to see if a control character (Code A) appears
#before a lower case character (Code B).
#
#Returns true only if it contains a control character and a lower case
#character doesn't appear before it.
Test str to see if a control character (Code A) appears
before a lower case character (Code B).

Returns true only if it contains a control character and a lower case
character doesn't appear before it.
Test str to see if a control character ( Code A ) appears before a lower case character ( Code B ) . Returns true only if it contains a control character and a lower case character doesn ' t appear before it .
def control_before_lowercase?(str)
        ctrl = str =~ CTRL_RE
        char = str =~ LOWR_RE
        ctrl && (!char || ctrl < char)
      end
def control_before_lowercase? ( str ) ctrl = str =~ CTRL_RE char = str =~ LOWR_RE ctrl && ( ! char || ctrl < char ) end
Test str to see if a control character (Code A) appears
before a lower case character (Code B).
Test str to see if a control character ( Code A ) appears before a lower case character ( Code B ) .
str