Here are the examples of the csharp api class ZXing.PDF417.Internal.PDF417HighLevelEncoder.isDigit(char) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
9 Examples
0
1. Example
View licenseprivate static int determineConsecutiveDigitCount(String msg, int startpos) { int count = 0; int len = msg.Length; int idx = startpos; if (idx < len) { char ch = msg[idx]; while (isDigit(ch) && idx < len) { count++; idx++; if (idx < len) { ch = msg[idx]; } } } return count; }
0
2. Example
View licenseprivate static int determineConsecutiveDigitCount(String msg, int startpos) { int count = 0; int len = msg.Length; int idx = startpos; if (idx < len) { char ch = msg[idx]; while (isDigit(ch) && idx < len) { count++; idx++; if (idx < len) { ch = msg[idx]; } } } return count; }
0
3. Example
View licenseprivate static int determineConsecutiveDigitCount(String msg, int startpos) { int count = 0; int len = msg.Length; int idx = startpos; if (idx < len) { char ch = msg[idx]; while (isDigit(ch) && idx < len) { count++; idx++; if (idx < len) { ch = msg[idx]; } } } return count; }
0
4. Example
View licenseprivate static int determineConsecutiveBinaryCount(String msg, byte[] bytes, int startpos) { int len = msg.Length; int idx = startpos; int idxb = idx; // bytes index (may differ from idx for utf-8 and other unicode encodings) while (idx < len) { char ch = msg[idx]; int numericCount = 0; while (numericCount < 13 && isDigit(ch)) { numericCount++; //textCount++; int i = idx + numericCount; if (i >= len) { break; } ch = msg[i]; } if (numericCount >= 13) { return idx - startpos; } ch = msg[idx]; //Check if character is encodable //Sun returns a ASCII 63 (?) for a character that cannot be mapped. Let's hope all //other VMs do the same if (bytes[idxb] == 63 && ch != '?') { throw new WriterException("Non-encodable character detected: " + ch + " (Unicode: " + (int) ch + ')'); } idx++; idxb++; if (ch >= 256) // for non-ascii symbols idxb++; } return idx - startpos; }
0
5. Example
View licenseprivate static int determineConsecutiveTextCount(String msg, int startpos) { int len = msg.Length; int idx = startpos; while (idx < len) { char ch = msg[idx]; int numericCount = 0; while (numericCount < 13 && isDigit(ch) && idx < len) { numericCount++; idx++; if (idx < len) { ch = msg[idx]; } } if (numericCount >= 13) { return idx - startpos - numericCount; } if (numericCount > 0) { //Heuristic: All text-encodable chars or digits are binary encodable continue; } ch = msg[idx]; //Check if character is encodable if (!isText(ch)) { break; } idx++; } return idx - startpos; }
0
6. Example
View licenseprivate static int determineConsecutiveBinaryCount(String msg, byte[] bytes, int startpos) { /n ..... /n //View Source file for more details /n }
0
7. Example
View licenseprivate static int determineConsecutiveTextCount(String msg, int startpos) { int len = msg.Length; int idx = startpos; while (idx < len) { char ch = msg[idx]; int numericCount = 0; while (numericCount < 13 && isDigit(ch) && idx < len) { numericCount++; idx++; if (idx < len) { ch = msg[idx]; } } if (numericCount >= 13) { return idx - startpos - numericCount; } if (numericCount > 0) { //Heuristic: All text-encodable chars or digits are binary encodable continue; } ch = msg[idx]; //Check if character is encodable if (!isText(ch)) { break; } idx++; } return idx - startpos; }
0
8. Example
View licenseprivate static int determineConsecutiveTextCount(String msg, int startpos) { int len = msg.Length; int idx = startpos; while (idx < len) { char ch = msg[idx]; int numericCount = 0; while (numericCount < 13 && isDigit(ch) && idx < len) { numericCount++; idx++; if (idx < len) { ch = msg[idx]; } } if (numericCount >= 13) { return idx - startpos - numericCount; } if (numericCount > 0) { //Heuristic: All text-encodable chars or digits are binary encodable continue; } ch = msg[idx]; //Check if character is encodable if (!isText(ch)) { break; } idx++; } return idx - startpos; }
0
9. Example
View licenseprivate static int determineConsecutiveBinaryCount(String msg, byte[] bytes, int startpos, Encoding encoding) { int len = msg.Length; int idx = startpos; int idxb = idx; // bytes index (may differ from idx for utf-8 and other unicode encodings) encoding = getEncoder(encoding); while (idx < len) { char ch = msg[idx]; int numericCount = 0; while (numericCount < 13 && isDigit(ch)) { numericCount++; //textCount++; int i = idx + numericCount; if (i >= len) { break; } ch = msg[i]; } if (numericCount >= 13) { return idx - startpos; } ch = msg[idx]; // .Net fallback strategie: REPLACEMENT_CHARACTER 0x3F if (bytes[idxb] == 63 && ch != '?') { throw new WriterException("Non-encodable character detected: " + ch + " (Unicode: " + (int) ch + ')'); } idx++; idxb++; if (toBytes(ch, encoding).Length > 1) // for non-ascii symbols idxb++; } return idx - startpos; }