pub fn make_alphanumeric(text: &str) -> Self {
        let mut bb = BitBuffer(Vec::with_capacity(text.len() * 5 + (text.len() + 1) / 2));
        let mut accumdata: u32 = 0;
        let mut accumcount: u32 = 0;
        for c in text.chars() {
            let i: usize = ALPHANUMERIC_CHARSET
                .find(c)
                .expect("String contains unencodable characters in alphanumeric mode");
            accumdata = accumdata * 45 + u32::try_from(i).unwrap();
            accumcount += 1;
            if accumcount == 2 {
                bb.append_bits(accumdata, 11);
                accumdata = 0;
                accumcount = 0;
            }
        }
        if accumcount > 0 {
            // 1 character remaining
            bb.append_bits(accumdata, 6);
        }
        QrSegment::new(QrSegmentMode::Alphanumeric, text.len(), bb.0)
    }
/// Returns a segment representing the given 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.
///
/// Panics if the string contains non-encodable characters.
Returns a segment representing the given 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.

Panics if the string contains non-encodable characters.
Returns a segment representing the given 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 . Panics if the string contains non - encodable characters .
pub fn make_alphanumeric(text: &str) -> Self {
        let mut bb = BitBuffer(Vec::with_capacity(text.len() * 5 + (text.len() + 1) / 2));
        let mut accumdata: u32 = 0;
        let mut accumcount: u32 = 0;
        for c in text.chars() {
            let i: usize = ALPHANUMERIC_CHARSET
                .find(c)
                .expect("String contains unencodable characters in alphanumeric mode");
            accumdata = accumdata * 45 + u32::try_from(i).unwrap();
            accumcount += 1;
            if accumcount == 2 {
                bb.append_bits(accumdata, 11);
                accumdata = 0;
                accumcount = 0;
            }
        }
        if accumcount > 0 {
            // 1 character remaining
            bb.append_bits(accumdata, 6);
        }
        QrSegment::new(QrSegmentMode::Alphanumeric, text.len(), bb.0)
    }
pub fn make_alphanumeric ( text : & str ) -> Self { let mut bb = BitBuffer ( Vec :: with_capacity ( text . len ( ) * 5 + ( text . len ( ) + 1 ) / 2 ) ) ; let mut accumdata : u32 = 0 ; let mut accumcount : u32 = 0 ; for c in text . chars ( ) { let i : usize = ALPHANUMERIC_CHARSET . find ( c ) . expect ( " " ) ; accumdata = accumdata * 45 + u32 :: try_from ( i ) . unwrap ( ) ; accumcount += 1 ; if accumcount == 2 { bb . append_bits ( accumdata , 11 ) ; accumdata = 0 ; accumcount = 0 ; } } if accumcount > 0 { // 1 character remaining bb . append_bits ( accumdata , 6 ) ; } QrSegment :: new ( QrSegmentMode :: Alphanumeric , text . len ( ) , bb . 0 ) }
Returns a segment representing the given text string encoded in alphanumeric mode.
Returns a segment representing the given text string encoded in alphanumeric mode .
text
&str