Home | History | Annotate | Download | only in qrcode

Lines Matching refs:content

64 void AppendNumericBytes(const ByteString& content,
67 int32_t length = content.GetLength();
70 int32_t num1 = content[i] - '0';
72 int32_t num2 = content[i + 1] - '0';
73 int32_t num3 = content[i + 2] - '0';
77 int32_t num2 = content[i + 1] - '0';
87 void AppendAlphaNumericBytes(const ByteString& content,
90 int32_t length = content.GetLength();
93 int32_t code1 = GetAlphaNumericCode(content[i]);
99 int32_t code2 = GetAlphaNumericCode(content[i + 1]);
113 void AppendGBKBytes(const ByteString& content,
116 int32_t length = content.GetLength();
119 value = (uint32_t)(content[i] << 8 | content[i + 1]);
133 void Append8BitBytes(const ByteString& content,
137 for (size_t i = 0; i < content.GetLength(); i++)
138 bits->AppendBits(content[i], 8);
141 void AppendKanjiBytes(const ByteString& content,
147 value = (uint32_t)((content[i] << 8) | content[i + 1]);
187 void AppendBytes(const ByteString& content,
193 AppendNumericBytes(content, bits, e);
195 AppendAlphaNumericBytes(content, bits, e);
197 Append8BitBytes(content, bits, encoding, e);
199 AppendKanjiBytes(content, bits, e);
201 AppendGBKBytes(content, bits, e);
426 void SplitString(const ByteString& content,
429 while (index < content.GetLength()) {
430 uint8_t c = static_cast<uint8_t>(content[index]);
436 result->push_back({CBC_QRCoderMode::sGBK, content.Left(index)});
437 if (index >= content.GetLength())
441 while (GetAlphaNumericCode(content[index]) == -1 &&
442 index < content.GetLength()) {
443 uint8_t c = static_cast<uint8_t>(content[index]);
447 bool high = !!IsDBCSLeadByte(content[index]);
449 bool high = content[index] > 127;
457 {CBC_QRCoderMode::sBYTE, content.Mid(flag, index - flag)});
460 if (index >= content.GetLength())
463 while (index < content.GetLength() && isdigit(content[index]))
468 {CBC_QRCoderMode::sNUMERIC, content.Mid(flag, index - flag)});
471 if (index >= content.GetLength())
474 while (index < content.GetLength() &&
475 GetAlphaNumericCode(content[index]) != -1) {
480 content.Mid(flag, index - flag)});
483 if (index < content.GetLength())
484 SplitString(content.Right(content.GetLength() - index), result);
487 CBC_QRCoderMode* ChooseMode(const ByteString& content, ByteString encoding) {
493 for (size_t i = 0; i < content.GetLength(); i++) {
494 if (isdigit(content[i])) {
496 } else if (GetAlphaNumericCode(content[i]) != -1) {
568 bool CBC_QRCoderEncoder::Encode(const WideString& content,
573 CBC_UtilCodingConvert::UnicodeToUTF8(content, utf8Data);
586 : content.GetLength();