@qr-platform/qr-code.js 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/chunks/scan-validator-node-BGUxkBJt.js +1 -0
- package/lib/chunks/scan-validator-zxing-node-CV9K2v4n.js +1 -0
- package/lib/core/qr-code-js.d.ts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/node/core/qr-code-js.d.ts +61 -0
- package/lib/node/core/qr-constant.d.ts +9 -0
- package/lib/node/core/qr-options-validation.d.ts +13 -0
- package/lib/node/core/qr-styles.d.ts +4 -0
- package/lib/node/core/qr-svg.d.ts +76 -0
- package/lib/node/core/qr-templates.d.ts +10 -0
- package/lib/node/figures/corner-dot.d.ts +24 -0
- package/lib/node/figures/corner-square.d.ts +24 -0
- package/lib/node/figures/dot.d.ts +31 -0
- package/lib/node/index.d.ts +101 -0
- package/lib/node/lib/image/GIFImage.d.ts +19 -0
- package/lib/node/lib/io/Base64.d.ts +10 -0
- package/lib/node/lib/io/Base64DecodeInputStream.d.ts +15 -0
- package/lib/node/lib/io/Base64EncodeOutputStream.d.ts +17 -0
- package/lib/node/lib/io/ByteArrayInputStream.d.ts +12 -0
- package/lib/node/lib/io/ByteArrayOutputStream.d.ts +12 -0
- package/lib/node/lib/io/InputStream.d.ts +10 -0
- package/lib/node/lib/io/OutputStream.d.ts +12 -0
- package/lib/node/lib/qr-code.d.ts +5 -0
- package/lib/node/lib/qrcode/BitBuffer.d.ts +11 -0
- package/lib/node/lib/qrcode/ErrorCorrectLevel.d.ts +23 -0
- package/lib/node/lib/qrcode/MaskPattern.d.ts +39 -0
- package/lib/node/lib/qrcode/Mode.d.ts +23 -0
- package/lib/node/lib/qrcode/Polynomial.d.ts +15 -0
- package/lib/node/lib/qrcode/QR8BitByte.d.ts +13 -0
- package/lib/node/lib/qrcode/QRAlphaNum.d.ts +13 -0
- package/lib/node/lib/qrcode/QRCode.d.ts +22 -0
- package/lib/node/lib/qrcode/QRCodeMinimal.d.ts +58 -0
- package/lib/node/lib/qrcode/QRData.d.ts +17 -0
- package/lib/node/lib/qrcode/QRKanji.d.ts +13 -0
- package/lib/node/lib/qrcode/QRMath.d.ts +13 -0
- package/lib/node/lib/qrcode/QRNumber.d.ts +14 -0
- package/lib/node/lib/qrcode/QRUtil.d.ts +25 -0
- package/lib/node/lib/qrcode/RSBlock.d.ts +16 -0
- package/lib/node/lib/text/createStringToBytes.d.ts +9 -0
- package/lib/node/lib/text/stringToBytes_SJIS.d.ts +8 -0
- package/lib/node/lib/text/stringToBytes_UTF8.d.ts +7 -0
- package/lib/node/lib/zbar-wasm/index.d.ts +1 -0
- package/lib/node/lib/zxing-js/src/browser/BrowserCodeReader.d.ts +150 -0
- package/lib/node/lib/zxing-js/src/browser/BrowserQRCodeReader.d.ts +29 -0
- package/lib/node/lib/zxing-js/src/browser/HTMLCanvasElementLuminanceSource.d.ts +27 -0
- package/lib/node/lib/zxing-js/src/browser/HTMLVisualMediaElement.d.ts +4 -0
- package/lib/node/lib/zxing-js/src/browser.d.ts +3 -0
- package/lib/node/lib/zxing-js/src/core/ArgumentException.d.ts +7 -0
- package/lib/node/lib/zxing-js/src/core/ArithmeticException.d.ts +7 -0
- package/lib/node/lib/zxing-js/src/core/ArrayIndexOutOfBoundsException.d.ts +10 -0
- package/lib/node/lib/zxing-js/src/core/BarcodeFormat.d.ts +42 -0
- package/lib/node/lib/zxing-js/src/core/Binarizer.d.ts +53 -0
- package/lib/node/lib/zxing-js/src/core/BinaryBitmap.d.ts +78 -0
- package/lib/node/lib/zxing-js/src/core/ChecksumException.d.ts +8 -0
- package/lib/node/lib/zxing-js/src/core/DecodeHintType.d.ts +91 -0
- package/lib/node/lib/zxing-js/src/core/Exception.d.ts +17 -0
- package/lib/node/lib/zxing-js/src/core/FormatException.d.ts +8 -0
- package/lib/node/lib/zxing-js/src/core/HighContrastLuminanceSource.d.ts +27 -0
- package/lib/node/lib/zxing-js/src/core/IllegalArgumentException.d.ts +7 -0
- package/lib/node/lib/zxing-js/src/core/IllegalStateException.d.ts +7 -0
- package/lib/node/lib/zxing-js/src/core/IndexOutOfBoundsException.d.ts +7 -0
- package/lib/node/lib/zxing-js/src/core/InvertedLuminanceSource.d.ts +22 -0
- package/lib/node/lib/zxing-js/src/core/LuminanceSource.d.ts +84 -0
- package/lib/node/lib/zxing-js/src/core/NodeLuminanceSource.d.ts +33 -0
- package/lib/node/lib/zxing-js/src/core/NotFoundException.d.ts +8 -0
- package/lib/node/lib/zxing-js/src/core/NullPointerException.d.ts +7 -0
- package/lib/node/lib/zxing-js/src/core/OutOfMemoryError.d.ts +6 -0
- package/lib/node/lib/zxing-js/src/core/Reader.d.ts +49 -0
- package/lib/node/lib/zxing-js/src/core/ReaderException.d.ts +7 -0
- package/lib/node/lib/zxing-js/src/core/ReedSolomonException.d.ts +7 -0
- package/lib/node/lib/zxing-js/src/core/Result.d.ts +52 -0
- package/lib/node/lib/zxing-js/src/core/ResultMetadataType.d.ts +68 -0
- package/lib/node/lib/zxing-js/src/core/ResultPoint.d.ts +34 -0
- package/lib/node/lib/zxing-js/src/core/ResultPointCallback.d.ts +11 -0
- package/lib/node/lib/zxing-js/src/core/UniversalLuminanceSource.d.ts +46 -0
- package/lib/node/lib/zxing-js/src/core/UnsupportedOperationException.d.ts +7 -0
- package/lib/node/lib/zxing-js/src/core/common/BitArray.d.ts +111 -0
- package/lib/node/lib/zxing-js/src/core/common/BitMatrix.d.ts +98 -0
- package/lib/node/lib/zxing-js/src/core/common/BitSource.d.ts +38 -0
- package/lib/node/lib/zxing-js/src/core/common/CharacterSetECI.d.ts +89 -0
- package/lib/node/lib/zxing-js/src/core/common/DecoderResult.d.ts +64 -0
- package/lib/node/lib/zxing-js/src/core/common/DefaultGridSampler.d.ts +10 -0
- package/lib/node/lib/zxing-js/src/core/common/DetectorResult.d.ts +16 -0
- package/lib/node/lib/zxing-js/src/core/common/GlobalHistogramBinarizer.d.ts +29 -0
- package/lib/node/lib/zxing-js/src/core/common/GridSampler.d.ts +36 -0
- package/lib/node/lib/zxing-js/src/core/common/GridSamplerInstance.d.ts +18 -0
- package/lib/node/lib/zxing-js/src/core/common/HybridBinarizer.d.ts +54 -0
- package/lib/node/lib/zxing-js/src/core/common/PerspectiveTransform.d.ts +26 -0
- package/lib/node/lib/zxing-js/src/core/common/StringUtils.d.ts +48 -0
- package/lib/node/lib/zxing-js/src/core/common/detector/MathUtils.d.ts +36 -0
- package/lib/node/lib/zxing-js/src/core/common/reedsolomon/AbstractGenericGF.d.ts +34 -0
- package/lib/node/lib/zxing-js/src/core/common/reedsolomon/GenericGF.d.ts +58 -0
- package/lib/node/lib/zxing-js/src/core/common/reedsolomon/GenericGFPoly.d.ts +47 -0
- package/lib/node/lib/zxing-js/src/core/common/reedsolomon/ReedSolomonDecoder.d.ts +40 -0
- package/lib/node/lib/zxing-js/src/core/qrcode/QRCodeReader.d.ts +35 -0
- package/lib/node/lib/zxing-js/src/core/qrcode/decoder/BitMatrixParser.d.ts +58 -0
- package/lib/node/lib/zxing-js/src/core/qrcode/decoder/DataBlock.d.ts +28 -0
- package/lib/node/lib/zxing-js/src/core/qrcode/decoder/DataMask.d.ts +36 -0
- package/lib/node/lib/zxing-js/src/core/qrcode/decoder/DecodedBitStreamParser.d.ts +30 -0
- package/lib/node/lib/zxing-js/src/core/qrcode/decoder/Decoder.d.ts +44 -0
- package/lib/node/lib/zxing-js/src/core/qrcode/decoder/ECB.d.ts +12 -0
- package/lib/node/lib/zxing-js/src/core/qrcode/decoder/ECBlocks.d.ts +16 -0
- package/lib/node/lib/zxing-js/src/core/qrcode/decoder/ErrorCorrectionLevel.d.ts +38 -0
- package/lib/node/lib/zxing-js/src/core/qrcode/decoder/FormatInformation.d.ts +33 -0
- package/lib/node/lib/zxing-js/src/core/qrcode/decoder/Mode.d.ts +56 -0
- package/lib/node/lib/zxing-js/src/core/qrcode/decoder/QRCodeDecoderMetaData.d.ts +21 -0
- package/lib/node/lib/zxing-js/src/core/qrcode/decoder/Version.d.ts +44 -0
- package/lib/node/lib/zxing-js/src/core/qrcode/detector/AlignmentPattern.d.ts +21 -0
- package/lib/node/lib/zxing-js/src/core/qrcode/detector/AlignmentPatternFinder.d.ts +82 -0
- package/lib/node/lib/zxing-js/src/core/qrcode/detector/Detector.d.ts +87 -0
- package/lib/node/lib/zxing-js/src/core/qrcode/detector/FinderPattern.d.ts +26 -0
- package/lib/node/lib/zxing-js/src/core/qrcode/detector/FinderPatternFinder.d.ts +114 -0
- package/lib/node/lib/zxing-js/src/core/qrcode/detector/FinderPatternInfo.d.ts +16 -0
- package/lib/node/lib/zxing-js/src/core/util/Arrays.d.ts +45 -0
- package/lib/node/lib/zxing-js/src/core/util/Charset.d.ts +7 -0
- package/lib/node/lib/zxing-js/src/core/util/Float.d.ts +14 -0
- package/lib/node/lib/zxing-js/src/core/util/Integer.d.ts +19 -0
- package/lib/node/lib/zxing-js/src/core/util/StringBuilder.d.ts +21 -0
- package/lib/node/lib/zxing-js/src/core/util/StringEncoding.d.ts +51 -0
- package/lib/node/lib/zxing-js/src/core/util/System.d.ts +10 -0
- package/lib/node/lib/zxing-js/src/customTypings.d.ts +16 -0
- package/lib/node/lib/zxing-js/src/index.d.ts +5 -0
- package/lib/node/lib/zxing-js/src/node.d.ts +1 -0
- package/lib/node/license/LicenseManager.d.ts +69 -0
- package/lib/node/license/LicenseManagerNode.d.ts +64 -0
- package/lib/node/node.d.ts +88 -0
- package/lib/node/options-demo.d.ts +239 -0
- package/lib/node/plugins/QRBorderHelpers.d.ts +32 -0
- package/lib/node/plugins/QRBorderPlugin.d.ts +35 -0
- package/lib/node/plugins/QRValidatorZbar.d.ts +38 -0
- package/lib/node/plugins/QRValidatorZbarNode.d.ts +60 -0
- package/lib/node/plugins/QRValidatorZbarNodeSharp.d.ts +83 -0
- package/lib/node/templates/borders-inner-outter.d.ts +129 -0
- package/lib/node/templates/borders-inner-scale-offset.d.ts +497 -0
- package/lib/node/templates/borders-inner.d.ts +129 -0
- package/lib/node/templates/borders-no-license.d.ts +129 -0
- package/lib/node/templates/borders-outter.d.ts +129 -0
- package/lib/node/templates/borders-text-auto-curved.d.ts +129 -0
- package/lib/node/templates/borders-text-full-curved.d.ts +133 -0
- package/lib/node/templates/borders.d.ts +129 -0
- package/lib/node/templates/scales.d.ts +130 -0
- package/lib/node/templates/scan-validators/index.d.ts +1 -0
- package/lib/node/templates/scan-validators/tests/cases/basic-inverted.d.ts +9 -0
- package/lib/node/templates/scan-validators/tests/cases/basic-no-license.d.ts +3 -0
- package/lib/node/templates/scan-validators/tests/cases/basic.d.ts +3 -0
- package/lib/node/templates/scan-validators/tests/cases/colors-inverted.d.ts +2 -0
- package/lib/node/templates/scan-validators/tests/cases/colors.d.ts +58 -0
- package/lib/node/templates/scan-validators/tests/cases/out-of-borders-inverted.d.ts +9 -0
- package/lib/node/templates/scan-validators/tests/cases/out-of-borders.d.ts +9 -0
- package/lib/node/templates/scan-validators/tests/cases/position-inverted.d.ts +9 -0
- package/lib/node/templates/scan-validators/tests/cases/position.d.ts +3 -0
- package/lib/node/templates/scan-validators/tests/index.d.ts +27 -0
- package/lib/node/tools/browser-image-tools.d.ts +7 -0
- package/lib/node/tools/browser-utils.d.ts +18 -0
- package/lib/node/types/helper.d.ts +23 -0
- package/lib/node/types/style-options.d.ts +37 -0
- package/lib/node/utils/canvas-options.d.ts +7 -0
- package/lib/node/utils/color.d.ts +4 -0
- package/lib/node/utils/gradient.d.ts +26 -0
- package/lib/node/utils/image.d.ts +16 -0
- package/lib/node/utils/merge.d.ts +5 -0
- package/lib/node/utils/options.d.ts +220 -0
- package/lib/node/utils/qrcode.d.ts +8 -0
- package/lib/node/utils/scan-validator-node.d.ts +15 -0
- package/lib/node/utils/scan-validator-zxing-node.d.ts +18 -0
- package/lib/node/utils/scan-validators/abstract-scan-validator.d.ts +43 -0
- package/lib/node/utils/scan-validators/zbar-scan-validator.d.ts +8 -0
- package/lib/node/utils/scan-validators/zxing-canvas-scan-validator.d.ts +10 -0
- package/lib/node/utils/scan-validators/zxing-scan-validator.d.ts +8 -0
- package/lib/node/utils/style-mapper.d.ts +13 -0
- package/lib/node/utils/svg.d.ts +2 -0
- package/lib/node/utils/token-validator.d.ts +19 -0
- package/lib/node.d.ts +4 -1
- package/lib/node.js +1 -1
- package/package.json +1 -1
@@ -0,0 +1,111 @@
|
|
1
|
+
/**
|
2
|
+
* <p>A simple, fast array of bits, represented compactly by an array of ints internally.</p>
|
3
|
+
*
|
4
|
+
* @author Sean Owen
|
5
|
+
*/
|
6
|
+
export default class BitArray {
|
7
|
+
private size;
|
8
|
+
private bits;
|
9
|
+
constructor(size?: number, bits?: Int32Array);
|
10
|
+
getSize(): number;
|
11
|
+
getSizeInBytes(): number;
|
12
|
+
private ensureCapacity;
|
13
|
+
/**
|
14
|
+
* @param i bit to get
|
15
|
+
* @return true iff bit i is set
|
16
|
+
*/
|
17
|
+
get(i: number): boolean;
|
18
|
+
/**
|
19
|
+
* Sets bit i.
|
20
|
+
*
|
21
|
+
* @param i bit to set
|
22
|
+
*/
|
23
|
+
set(i: number): void;
|
24
|
+
/**
|
25
|
+
* Flips bit i.
|
26
|
+
*
|
27
|
+
* @param i bit to set
|
28
|
+
*/
|
29
|
+
flip(i: number): void;
|
30
|
+
/**
|
31
|
+
* @param from first bit to check
|
32
|
+
* @return index of first bit that is set, starting from the given index, or size if none are set
|
33
|
+
* at or beyond this given index
|
34
|
+
* @see #getNextUnset(int)
|
35
|
+
*/
|
36
|
+
getNextSet(from: number): number;
|
37
|
+
/**
|
38
|
+
* @param from index to start looking for unset bit
|
39
|
+
* @return index of next unset bit, or {@code size} if none are unset until the end
|
40
|
+
* @see #getNextSet(int)
|
41
|
+
*/
|
42
|
+
getNextUnset(from: number): number;
|
43
|
+
/**
|
44
|
+
* Sets a block of 32 bits, starting at bit i.
|
45
|
+
*
|
46
|
+
* @param i first bit to set
|
47
|
+
* @param newBits the new value of the next 32 bits. Note again that the least-significant bit
|
48
|
+
* corresponds to bit i, the next-least-significant to i+1, and so on.
|
49
|
+
*/
|
50
|
+
setBulk(i: number, newBits: number): void;
|
51
|
+
/**
|
52
|
+
* Sets a range of bits.
|
53
|
+
*
|
54
|
+
* @param start start of range, inclusive.
|
55
|
+
* @param end end of range, exclusive
|
56
|
+
*/
|
57
|
+
setRange(start: number, end: number): void;
|
58
|
+
/**
|
59
|
+
* Clears all bits (sets to false).
|
60
|
+
*/
|
61
|
+
clear(): void;
|
62
|
+
/**
|
63
|
+
* Efficient method to check if a range of bits is set, or not set.
|
64
|
+
*
|
65
|
+
* @param start start of range, inclusive.
|
66
|
+
* @param end end of range, exclusive
|
67
|
+
* @param value if true, checks that bits in range are set, otherwise checks that they are not set
|
68
|
+
* @return true iff all bits are set or not set in range, according to value argument
|
69
|
+
* @throws IllegalArgumentException if end is less than start or the range is not contained in the array
|
70
|
+
*/
|
71
|
+
isRange(start: number, end: number, value: boolean): boolean;
|
72
|
+
appendBit(bit: boolean): void;
|
73
|
+
/**
|
74
|
+
* Appends the least-significant bits, from value, in order from most-significant to
|
75
|
+
* least-significant. For example, appending 6 bits from 0x000001E will append the bits
|
76
|
+
* 0, 1, 1, 1, 1, 0 in that order.
|
77
|
+
*
|
78
|
+
* @param value {@code int} containing bits to append
|
79
|
+
* @param numBits bits from value to append
|
80
|
+
*/
|
81
|
+
appendBits(value: number, numBits: number): void;
|
82
|
+
appendBitArray(other: BitArray): void;
|
83
|
+
xor(other: BitArray): void;
|
84
|
+
/**
|
85
|
+
*
|
86
|
+
* @param bitOffset first bit to start writing
|
87
|
+
* @param array array to write into. Bytes are written most-significant byte first. This is the opposite
|
88
|
+
* of the internal representation, which is exposed by {@link #getBitArray()}
|
89
|
+
* @param offset position in array to start writing
|
90
|
+
* @param numBytes how many bytes to write
|
91
|
+
*/
|
92
|
+
toBytes(bitOffset: number, array: Uint8Array, offset: number, numBytes: number): void;
|
93
|
+
/**
|
94
|
+
* @return underlying array of ints. The first element holds the first 32 bits, and the least
|
95
|
+
* significant bit is bit 0.
|
96
|
+
*/
|
97
|
+
getBitArray(): Int32Array;
|
98
|
+
/**
|
99
|
+
* Reverses all bits in the array.
|
100
|
+
*/
|
101
|
+
reverse(): void;
|
102
|
+
private static makeArray;
|
103
|
+
equals(o: any): boolean;
|
104
|
+
hashCode(): number;
|
105
|
+
toString(): string;
|
106
|
+
clone(): BitArray;
|
107
|
+
/**
|
108
|
+
* converts to boolean array.
|
109
|
+
*/
|
110
|
+
toArray(): Array<boolean>;
|
111
|
+
}
|
@@ -0,0 +1,98 @@
|
|
1
|
+
import { int } from '../../customTypings';
|
2
|
+
import BitArray from './BitArray';
|
3
|
+
export default class BitMatrix {
|
4
|
+
private width;
|
5
|
+
private height?;
|
6
|
+
private rowSize?;
|
7
|
+
private bits?;
|
8
|
+
constructor(width: number, height?: number | undefined, rowSize?: number | undefined, bits?: Int32Array | undefined);
|
9
|
+
/**
|
10
|
+
* Interprets a 2D array of booleans as a BitMatrix, where "true" means an "on" bit.
|
11
|
+
*/
|
12
|
+
static parseFromBooleanArray(image: boolean[][]): BitMatrix;
|
13
|
+
/**
|
14
|
+
* Parses a string representation of the bit matrix.
|
15
|
+
*/
|
16
|
+
static parseFromString(stringRepresentation: string, setString: string, unsetString: string): BitMatrix;
|
17
|
+
/**
|
18
|
+
* Gets the bit at position (x, y).
|
19
|
+
*/
|
20
|
+
get(x: number, y: number): boolean;
|
21
|
+
/**
|
22
|
+
* Sets the bit at position (x, y) to true.
|
23
|
+
*/
|
24
|
+
set(x: number, y: number): void;
|
25
|
+
/**
|
26
|
+
* Unsets the bit at position (x, y) (sets it to false).
|
27
|
+
*/
|
28
|
+
unset(x: number, y: number): void;
|
29
|
+
/**
|
30
|
+
* Flips the bit at position (x, y).
|
31
|
+
*/
|
32
|
+
flip(x: number, y: number): void;
|
33
|
+
/**
|
34
|
+
* XORs this matrix with another matrix.
|
35
|
+
*/
|
36
|
+
xor(mask: BitMatrix): void;
|
37
|
+
/**
|
38
|
+
* Clears all bits (sets to false).
|
39
|
+
*/
|
40
|
+
clear(): void;
|
41
|
+
/**
|
42
|
+
* Sets a square region of the matrix to true.
|
43
|
+
*/
|
44
|
+
setRegion(left: number, top: number, width: number, height: number): void;
|
45
|
+
/**
|
46
|
+
* Retrieves a row as a BitArray.
|
47
|
+
*/
|
48
|
+
getRow(y: number, row?: BitArray): BitArray;
|
49
|
+
/**
|
50
|
+
* Sets a row from a BitArray.
|
51
|
+
*/
|
52
|
+
setRow(y: number, row: BitArray): void;
|
53
|
+
/**
|
54
|
+
* Rotates the matrix 180 degrees.
|
55
|
+
*/
|
56
|
+
rotate180(): void;
|
57
|
+
/**
|
58
|
+
* Returns the smallest rectangle that encloses all set bits.
|
59
|
+
*/
|
60
|
+
getEnclosingRectangle(): Int32Array;
|
61
|
+
/**
|
62
|
+
* Returns the coordinate of the top-left set bit.
|
63
|
+
*/
|
64
|
+
getTopLeftOnBit(): Int32Array;
|
65
|
+
/**
|
66
|
+
* Returns the coordinate of the bottom-right set bit.
|
67
|
+
*/
|
68
|
+
getBottomRightOnBit(): Int32Array;
|
69
|
+
/**
|
70
|
+
* Returns the width of the matrix.
|
71
|
+
*/
|
72
|
+
getWidth(): number;
|
73
|
+
/**
|
74
|
+
* Returns the height of the matrix.
|
75
|
+
*/
|
76
|
+
getHeight(): number;
|
77
|
+
/**
|
78
|
+
* Returns the row size of the matrix.
|
79
|
+
*/
|
80
|
+
getRowSize(): number;
|
81
|
+
/**
|
82
|
+
* Checks equality with another BitMatrix.
|
83
|
+
*/
|
84
|
+
equals(o: Object): boolean;
|
85
|
+
/**
|
86
|
+
* Computes the hash code.
|
87
|
+
*/
|
88
|
+
hashCode(): int;
|
89
|
+
/**
|
90
|
+
* Returns a string representation of the matrix.
|
91
|
+
*/
|
92
|
+
toString(setString?: string, unsetString?: string, lineSeparator?: string): string;
|
93
|
+
private buildToString;
|
94
|
+
/**
|
95
|
+
* Returns a clone of this BitMatrix.
|
96
|
+
*/
|
97
|
+
clone(): BitMatrix;
|
98
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
/**
|
2
|
+
* <p>This provides an easy abstraction to read bits at a time from a sequence of bytes, where the
|
3
|
+
* number of bits read is not often a multiple of 8.</p>
|
4
|
+
*
|
5
|
+
* <p>This class is thread-safe but not reentrant -- unless the caller modifies the bytes array
|
6
|
+
* it passed in, in which case all bets are off.</p>
|
7
|
+
*
|
8
|
+
* @author Sean Owen
|
9
|
+
*/
|
10
|
+
export default class BitSource {
|
11
|
+
private bytes;
|
12
|
+
private byteOffset;
|
13
|
+
private bitOffset;
|
14
|
+
/**
|
15
|
+
* @param bytes bytes from which this will read bits. Bits will be read from the first byte first.
|
16
|
+
* Bits are read within a byte from most-significant to least-significant bit.
|
17
|
+
*/
|
18
|
+
constructor(bytes: Uint8Array);
|
19
|
+
/**
|
20
|
+
* @return index of next bit in current byte which would be read by the next call to {@link #readBits(int)}.
|
21
|
+
*/
|
22
|
+
getBitOffset(): number;
|
23
|
+
/**
|
24
|
+
* @return index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}.
|
25
|
+
*/
|
26
|
+
getByteOffset(): number;
|
27
|
+
/**
|
28
|
+
* @param numBits number of bits to read
|
29
|
+
* @return int representing the bits read. The bits will appear as the least-significant
|
30
|
+
* bits of the int
|
31
|
+
* @throws IllegalArgumentException if numBits isn't in [1,32] or more than is available
|
32
|
+
*/
|
33
|
+
readBits(numBits: number): number;
|
34
|
+
/**
|
35
|
+
* @return number of bits that can be read successfully
|
36
|
+
*/
|
37
|
+
available(): number;
|
38
|
+
}
|
@@ -0,0 +1,89 @@
|
|
1
|
+
export declare enum CharacterSetValueIdentifiers {
|
2
|
+
Cp437 = 0,
|
3
|
+
ISO8859_1 = 1,
|
4
|
+
ISO8859_2 = 2,
|
5
|
+
ISO8859_3 = 3,
|
6
|
+
ISO8859_4 = 4,
|
7
|
+
ISO8859_5 = 5,
|
8
|
+
ISO8859_6 = 6,
|
9
|
+
ISO8859_7 = 7,
|
10
|
+
ISO8859_8 = 8,
|
11
|
+
ISO8859_9 = 9,
|
12
|
+
ISO8859_10 = 10,
|
13
|
+
ISO8859_11 = 11,
|
14
|
+
ISO8859_13 = 12,
|
15
|
+
ISO8859_14 = 13,
|
16
|
+
ISO8859_15 = 14,
|
17
|
+
ISO8859_16 = 15,
|
18
|
+
SJIS = 16,
|
19
|
+
Cp1250 = 17,
|
20
|
+
Cp1251 = 18,
|
21
|
+
Cp1252 = 19,
|
22
|
+
Cp1256 = 20,
|
23
|
+
UnicodeBigUnmarked = 21,
|
24
|
+
UTF8 = 22,
|
25
|
+
ASCII = 23,
|
26
|
+
Big5 = 24,
|
27
|
+
GB18030 = 25,
|
28
|
+
EUC_KR = 26
|
29
|
+
}
|
30
|
+
/**
|
31
|
+
* Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1
|
32
|
+
* of ISO 18004.
|
33
|
+
*
|
34
|
+
* @author Sean Owen
|
35
|
+
*/
|
36
|
+
export default class CharacterSetECI {
|
37
|
+
valueIdentifier: CharacterSetValueIdentifiers;
|
38
|
+
name: string;
|
39
|
+
private static VALUE_IDENTIFIER_TO_ECI;
|
40
|
+
private static VALUES_TO_ECI;
|
41
|
+
private static NAME_TO_ECI;
|
42
|
+
static readonly Cp437: CharacterSetECI;
|
43
|
+
static readonly ISO8859_1: CharacterSetECI;
|
44
|
+
static readonly ISO8859_2: CharacterSetECI;
|
45
|
+
static readonly ISO8859_3: CharacterSetECI;
|
46
|
+
static readonly ISO8859_4: CharacterSetECI;
|
47
|
+
static readonly ISO8859_5: CharacterSetECI;
|
48
|
+
static readonly ISO8859_6: CharacterSetECI;
|
49
|
+
static readonly ISO8859_7: CharacterSetECI;
|
50
|
+
static readonly ISO8859_8: CharacterSetECI;
|
51
|
+
static readonly ISO8859_9: CharacterSetECI;
|
52
|
+
static readonly ISO8859_10: CharacterSetECI;
|
53
|
+
static readonly ISO8859_11: CharacterSetECI;
|
54
|
+
static readonly ISO8859_13: CharacterSetECI;
|
55
|
+
static readonly ISO8859_14: CharacterSetECI;
|
56
|
+
static readonly ISO8859_15: CharacterSetECI;
|
57
|
+
static readonly ISO8859_16: CharacterSetECI;
|
58
|
+
static readonly SJIS: CharacterSetECI;
|
59
|
+
static readonly Cp1250: CharacterSetECI;
|
60
|
+
static readonly Cp1251: CharacterSetECI;
|
61
|
+
static readonly Cp1252: CharacterSetECI;
|
62
|
+
static readonly Cp1256: CharacterSetECI;
|
63
|
+
static readonly UnicodeBigUnmarked: CharacterSetECI;
|
64
|
+
static readonly UTF8: CharacterSetECI;
|
65
|
+
static readonly ASCII: CharacterSetECI;
|
66
|
+
static readonly Big5: CharacterSetECI;
|
67
|
+
static readonly GB18030: CharacterSetECI;
|
68
|
+
static readonly EUC_KR: CharacterSetECI;
|
69
|
+
values: Int32Array;
|
70
|
+
otherEncodingNames: string[];
|
71
|
+
constructor(valueIdentifier: CharacterSetValueIdentifiers, valuesParam: Int32Array | number, name: string, ...otherEncodingNames: string[]);
|
72
|
+
getValueIdentifier(): CharacterSetValueIdentifiers;
|
73
|
+
getName(): string;
|
74
|
+
getValue(): number;
|
75
|
+
/**
|
76
|
+
* @param value character set ECI value
|
77
|
+
* @return {@code CharacterSetECI} representing ECI of given value, or null if it is legal but
|
78
|
+
* unsupported
|
79
|
+
* @throws FormatException if ECI value is invalid
|
80
|
+
*/
|
81
|
+
static getCharacterSetECIByValue(value: number): CharacterSetECI;
|
82
|
+
/**
|
83
|
+
* @param name character set ECI encoding name
|
84
|
+
* @return CharacterSetECI representing ECI for character encoding, or null if it is legal
|
85
|
+
* but unsupported
|
86
|
+
*/
|
87
|
+
static getCharacterSetECIByName(name: string): CharacterSetECI;
|
88
|
+
equals(o: CharacterSetECI): boolean;
|
89
|
+
}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
/**
|
2
|
+
* <p>Encapsulates the result of decoding a matrix of bits. This typically
|
3
|
+
* applies to 2D barcode formats. For now it contains the raw bytes obtained,
|
4
|
+
* as well as a String interpretation of those bytes, if applicable.</p>
|
5
|
+
*
|
6
|
+
* @author Sean Owen
|
7
|
+
*/
|
8
|
+
export default class DecoderResult {
|
9
|
+
private rawBytes;
|
10
|
+
private text;
|
11
|
+
private byteSegments;
|
12
|
+
private ecLevel;
|
13
|
+
private structuredAppendSequenceNumber;
|
14
|
+
private structuredAppendParity;
|
15
|
+
private numBits;
|
16
|
+
private errorsCorrected;
|
17
|
+
private erasures;
|
18
|
+
private other;
|
19
|
+
constructor(rawBytes: Uint8Array, text: string, byteSegments: Uint8Array[], ecLevel: string, structuredAppendSequenceNumber?: number, structuredAppendParity?: number);
|
20
|
+
/**
|
21
|
+
* @return raw bytes representing the result, or {@code null} if not applicable
|
22
|
+
*/
|
23
|
+
getRawBytes(): Uint8Array;
|
24
|
+
/**
|
25
|
+
* @return how many bits of {@link #getRawBytes()} are valid; typically 8 times its length
|
26
|
+
* @since 3.3.0
|
27
|
+
*/
|
28
|
+
getNumBits(): number;
|
29
|
+
/**
|
30
|
+
* @param numBits overrides the number of bits that are valid in {@link #getRawBytes()}
|
31
|
+
* @since 3.3.0
|
32
|
+
*/
|
33
|
+
setNumBits(numBits: number): void;
|
34
|
+
/**
|
35
|
+
* @return text representation of the result
|
36
|
+
*/
|
37
|
+
getText(): string;
|
38
|
+
/**
|
39
|
+
* @return list of byte segments in the result, or {@code null} if not applicable
|
40
|
+
*/
|
41
|
+
getByteSegments(): Uint8Array[];
|
42
|
+
/**
|
43
|
+
* @return name of error correction level used, or {@code null} if not applicable
|
44
|
+
*/
|
45
|
+
getECLevel(): string;
|
46
|
+
/**
|
47
|
+
* @return number of errors corrected, or {@code null} if not applicable
|
48
|
+
*/
|
49
|
+
getErrorsCorrected(): number | undefined;
|
50
|
+
setErrorsCorrected(errorsCorrected: number): void;
|
51
|
+
/**
|
52
|
+
* @return number of erasures corrected, or {@code null} if not applicable
|
53
|
+
*/
|
54
|
+
getErasures(): number | undefined;
|
55
|
+
setErasures(erasures: number): void;
|
56
|
+
/**
|
57
|
+
* @return arbitrary additional metadata
|
58
|
+
*/
|
59
|
+
getOther(): any;
|
60
|
+
setOther(other: any): void;
|
61
|
+
hasStructuredAppend(): boolean;
|
62
|
+
getStructuredAppendParity(): number;
|
63
|
+
getStructuredAppendSequenceNumber(): number;
|
64
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import BitMatrix from './BitMatrix';
|
2
|
+
import GridSampler from './GridSampler';
|
3
|
+
import PerspectiveTransform from './PerspectiveTransform';
|
4
|
+
/**
|
5
|
+
* @author Sean Owen
|
6
|
+
*/
|
7
|
+
export default class DefaultGridSampler extends GridSampler {
|
8
|
+
sampleGrid(image: BitMatrix, dimensionX: number, dimensionY: number, p1ToX: number, p1ToY: number, p2ToX: number, p2ToY: number, p3ToX: number, p3ToY: number, p4ToX: number, p4ToY: number, p1FromX: number, p1FromY: number, p2FromX: number, p2FromY: number, p3FromX: number, p3FromY: number, p4FromX: number, p4FromY: number): BitMatrix;
|
9
|
+
sampleGridWithTransform(image: BitMatrix, dimensionX: number, dimensionY: number, transform: PerspectiveTransform): BitMatrix;
|
10
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import ResultPoint from '../ResultPoint';
|
2
|
+
import BitMatrix from './BitMatrix';
|
3
|
+
/**
|
4
|
+
* <p>Encapsulates the result of detecting a barcode in an image. This includes the raw
|
5
|
+
* matrix of black/white pixels corresponding to the barcode, and possibly points of interest
|
6
|
+
* in the image, like the location of finder patterns or corners of the barcode in the image.</p>
|
7
|
+
*
|
8
|
+
* @author Sean Owen
|
9
|
+
*/
|
10
|
+
export default class DetectorResult {
|
11
|
+
private bits;
|
12
|
+
private points;
|
13
|
+
constructor(bits: BitMatrix, points: Array<ResultPoint>);
|
14
|
+
getBits(): BitMatrix;
|
15
|
+
getPoints(): Array<ResultPoint>;
|
16
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import Binarizer from '../Binarizer';
|
2
|
+
import LuminanceSource from '../LuminanceSource';
|
3
|
+
import BitArray from './BitArray';
|
4
|
+
import BitMatrix from './BitMatrix';
|
5
|
+
/**
|
6
|
+
* This Binarizer implementation uses the old ZXing global histogram approach. It is suitable
|
7
|
+
* for low-end mobile devices which don't have enough CPU or memory to use a local thresholding
|
8
|
+
* algorithm. However, because it picks a global black point, it cannot handle difficult shadows
|
9
|
+
* and gradients.
|
10
|
+
*
|
11
|
+
* Faster mobile devices and all desktop applications should probably use HybridBinarizer instead.
|
12
|
+
*
|
13
|
+
* @author dswitkin@google.com (Daniel Switkin)
|
14
|
+
* @author Sean Owen
|
15
|
+
*/
|
16
|
+
export default class GlobalHistogramBinarizer extends Binarizer {
|
17
|
+
private static LUMINANCE_BITS;
|
18
|
+
private static LUMINANCE_SHIFT;
|
19
|
+
private static LUMINANCE_BUCKETS;
|
20
|
+
private static EMPTY;
|
21
|
+
private luminances;
|
22
|
+
private buckets;
|
23
|
+
constructor(source: LuminanceSource);
|
24
|
+
getBlackRow(y: number, row: BitArray): BitArray;
|
25
|
+
getBlackMatrix(): BitMatrix;
|
26
|
+
createBinarizer(source: LuminanceSource): Binarizer;
|
27
|
+
private initArrays;
|
28
|
+
private static estimateBlackPoint;
|
29
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import BitMatrix from './BitMatrix';
|
2
|
+
import PerspectiveTransform from './PerspectiveTransform';
|
3
|
+
/**
|
4
|
+
* Implementations of this class can, given locations of finder patterns for a QR code in an
|
5
|
+
* image, sample the right points in the image to reconstruct the QR code, accounting for
|
6
|
+
* perspective distortion. It is abstracted since it is relatively expensive and should be allowed
|
7
|
+
* to take advantage of platform-specific optimized implementations, like Sun's Java Advanced
|
8
|
+
* Imaging library, but which may not be available in other environments such as J2ME, and vice
|
9
|
+
* versa.
|
10
|
+
*
|
11
|
+
* The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)}
|
12
|
+
* with an instance of a class which implements this interface.
|
13
|
+
*
|
14
|
+
* @author Sean Owen
|
15
|
+
*/
|
16
|
+
declare abstract class GridSampler {
|
17
|
+
abstract sampleGrid(image: BitMatrix, dimensionX: number, dimensionY: number, p1ToX: number, p1ToY: number, p2ToX: number, p2ToY: number, p3ToX: number, p3ToY: number, p4ToX: number, p4ToY: number, p1FromX: number, p1FromY: number, p2FromX: number, p2FromY: number, p3FromX: number, p3FromY: number, p4FromX: number, p4FromY: number): BitMatrix;
|
18
|
+
abstract sampleGridWithTransform(image: BitMatrix, dimensionX: number, dimensionY: number, transform: PerspectiveTransform): BitMatrix;
|
19
|
+
/**
|
20
|
+
* Checks a set of points that have been transformed to sample points on an image against
|
21
|
+
* the image's dimensions to see if the points are even within the image.
|
22
|
+
*
|
23
|
+
* This method will actually "nudge" the endpoints back onto the image if they are found to be
|
24
|
+
* barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder
|
25
|
+
* patterns in an image where the QR Code runs all the way to the image border.
|
26
|
+
*
|
27
|
+
* For efficiency, the method will check points from either end of the line until one is found
|
28
|
+
* to be within the image. Because the set of points are assumed to be linear, this is valid.
|
29
|
+
*
|
30
|
+
* @param image image into which the points should map
|
31
|
+
* @param points actual points in x1,y1,...,xn,yn form
|
32
|
+
* @throws NotFoundException if an endpoint lies outside the image boundaries
|
33
|
+
*/
|
34
|
+
protected static checkAndNudgePoints(image: BitMatrix, points: Float32Array): void;
|
35
|
+
}
|
36
|
+
export default GridSampler;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import GridSampler from './GridSampler';
|
2
|
+
export default class GridSamplerInstance {
|
3
|
+
private static gridSampler;
|
4
|
+
/**
|
5
|
+
* Sets the implementation of GridSampler used by the library. One global
|
6
|
+
* instance is stored, which may sound problematic. But, the implementation provided
|
7
|
+
* ought to be appropriate for the entire platform, and all uses of this library
|
8
|
+
* in the whole lifetime of the JVM. For instance, an Android activity can swap in
|
9
|
+
* an implementation that takes advantage of native platform libraries.
|
10
|
+
*
|
11
|
+
* @param newGridSampler The platform-specific object to install.
|
12
|
+
*/
|
13
|
+
static setGridSampler(newGridSampler: GridSampler): void;
|
14
|
+
/**
|
15
|
+
* @return the current implementation of GridSampler
|
16
|
+
*/
|
17
|
+
static getInstance(): GridSampler;
|
18
|
+
}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import Binarizer from '../Binarizer';
|
2
|
+
import LuminanceSource from '../LuminanceSource';
|
3
|
+
import BitMatrix from './BitMatrix';
|
4
|
+
import GlobalHistogramBinarizer from './GlobalHistogramBinarizer';
|
5
|
+
/**
|
6
|
+
* This class implements a local thresholding algorithm, which while slower than the
|
7
|
+
* GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for
|
8
|
+
* high frequency images of barcodes with black data on white backgrounds. For this application,
|
9
|
+
* it does a much better job than a global blackpoint with severe shadows and gradients.
|
10
|
+
* However it tends to produce artifacts on lower frequency images and is therefore not
|
11
|
+
* a good general purpose binarizer for uses outside ZXing.
|
12
|
+
*
|
13
|
+
* This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers,
|
14
|
+
* and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already
|
15
|
+
* inherently local, and only fails for horizontal gradients. We can revisit that problem later,
|
16
|
+
* but for now it was not a win to use local blocks for 1D.
|
17
|
+
*
|
18
|
+
* This Binarizer is the default for the unit tests and the recommended class for library users.
|
19
|
+
*
|
20
|
+
* @author dswitkin@google.com (Daniel Switkin)
|
21
|
+
*/
|
22
|
+
export default class HybridBinarizer extends GlobalHistogramBinarizer {
|
23
|
+
private static BLOCK_SIZE_POWER;
|
24
|
+
private static BLOCK_SIZE;
|
25
|
+
private static BLOCK_SIZE_MASK;
|
26
|
+
private static MINIMUM_DIMENSION;
|
27
|
+
private static MIN_DYNAMIC_RANGE;
|
28
|
+
private matrix;
|
29
|
+
constructor(source: LuminanceSource);
|
30
|
+
/**
|
31
|
+
* Calculates the final BitMatrix once for all requests. This could be called once from the
|
32
|
+
* constructor instead, but there are some advantages to doing it lazily, such as making
|
33
|
+
* profiling easier, and not doing heavy lifting when callers don't expect it.
|
34
|
+
*/
|
35
|
+
getBlackMatrix(): BitMatrix;
|
36
|
+
createBinarizer(source: LuminanceSource): Binarizer;
|
37
|
+
/**
|
38
|
+
* For each block in the image, calculate the average black point using a 5x5 grid
|
39
|
+
* of the blocks around it. Also handles the corner cases (fractional blocks are computed based
|
40
|
+
* on the last pixels in the row/column which are also used in the previous block).
|
41
|
+
*/
|
42
|
+
private static calculateThresholdForBlock;
|
43
|
+
private static cap;
|
44
|
+
/**
|
45
|
+
* Applies a single threshold to a block of pixels.
|
46
|
+
*/
|
47
|
+
private static thresholdBlock;
|
48
|
+
/**
|
49
|
+
* Calculates a single black point for each block of pixels and saves it away.
|
50
|
+
* See the following thread for a discussion of this algorithm:
|
51
|
+
* http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0
|
52
|
+
*/
|
53
|
+
private static calculateBlackPoints;
|
54
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
/**
|
2
|
+
* <p>This class implements a perspective transform in two dimensions. Given four source and four
|
3
|
+
* destination points, it will compute the transformation implied between them. The code is based
|
4
|
+
* directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.</p>
|
5
|
+
*
|
6
|
+
* @author Sean Owen
|
7
|
+
*/
|
8
|
+
export default class PerspectiveTransform {
|
9
|
+
private a11;
|
10
|
+
private a21;
|
11
|
+
private a31;
|
12
|
+
private a12;
|
13
|
+
private a22;
|
14
|
+
private a32;
|
15
|
+
private a13;
|
16
|
+
private a23;
|
17
|
+
private a33;
|
18
|
+
private constructor();
|
19
|
+
static quadrilateralToQuadrilateral(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, x0p: number, y0p: number, x1p: number, y1p: number, x2p: number, y2p: number, x3p: number, y3p: number): PerspectiveTransform;
|
20
|
+
transformPoints(points: Float32Array): void;
|
21
|
+
transformPointsWithValues(xValues: Float32Array, yValues: Float32Array): void;
|
22
|
+
static squareToQuadrilateral(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, x3: number, y3: number): PerspectiveTransform;
|
23
|
+
static quadrilateralToSquare(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, x3: number, y3: number): PerspectiveTransform;
|
24
|
+
protected buildAdjoint(): PerspectiveTransform;
|
25
|
+
protected times(other: PerspectiveTransform): PerspectiveTransform;
|
26
|
+
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { int } from '../../customTypings';
|
2
|
+
import DecodeHintType from '../DecodeHintType';
|
3
|
+
import Charset from '../util/Charset';
|
4
|
+
import CharacterSetECI from './CharacterSetECI';
|
5
|
+
/**
|
6
|
+
* Common string-related functions.
|
7
|
+
*
|
8
|
+
* @author Sean Owen
|
9
|
+
* @author Alex Dupre
|
10
|
+
*/
|
11
|
+
export default class StringUtils {
|
12
|
+
static SHIFT_JIS: string;
|
13
|
+
static GB2312: string;
|
14
|
+
static ISO88591: string;
|
15
|
+
private static EUC_JP;
|
16
|
+
private static UTF8;
|
17
|
+
private static PLATFORM_DEFAULT_ENCODING;
|
18
|
+
private static ASSUME_SHIFT_JIS;
|
19
|
+
static castAsNonUtf8Char(code: number, encoding?: Charset): string;
|
20
|
+
/**
|
21
|
+
* @param bytes bytes encoding a string, whose encoding should be guessed
|
22
|
+
* @param hints decode hints if applicable
|
23
|
+
* @return name of guessed encoding; at the moment will only guess one of:
|
24
|
+
* {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform
|
25
|
+
* default encoding if none of these can possibly be correct
|
26
|
+
*/
|
27
|
+
static guessEncoding(bytes: Uint8Array, hints: Map<DecodeHintType, any>): string;
|
28
|
+
/**
|
29
|
+
*
|
30
|
+
* @see https://stackoverflow.com/a/13439711/4367683
|
31
|
+
*
|
32
|
+
* @param append The new string to append.
|
33
|
+
* @param args Argumets values to be formated.
|
34
|
+
*/
|
35
|
+
static format(append: string, ...args: any[]): string;
|
36
|
+
/**
|
37
|
+
*
|
38
|
+
*/
|
39
|
+
static getBytes(str: string, encoding: CharacterSetECI): Uint8Array;
|
40
|
+
/**
|
41
|
+
* Returns the charcode at the specified index or at index zero.
|
42
|
+
*/
|
43
|
+
static getCharCode(str: string, index?: number): int;
|
44
|
+
/**
|
45
|
+
* Returns char for given charcode
|
46
|
+
*/
|
47
|
+
static getCharAt(charCode: number): string;
|
48
|
+
}
|