| 57 | // QR Code version is automatically chosen for the output. The ECC level of the result may be higher than the |
| 58 | // ecl argument if it can be done without increasing the version. |
| 59 | public static encodeText(text: string, ecl: QrCodeEcc): QrCode { |
| 60 | const segs: Array<QrSegment> = QrSegment.makeSegments(text); |
| 61 | return QrCode.encodeSegments(segs, ecl); |
| 62 | } |
| 63 | |
| 64 | // Returns a QR Code representing the given binary data at the given error correction level. |
| 65 | // This function always encodes using the binary segment mode, not any text mode. The maximum number of |