Lines Matching defs:text

36  * Splits text into optimal segments and encodes kanji segments.
46 * Returns a list of zero or more segments to represent the specified Unicode text string.
49 * <p>This function can utilize all four text encoding modes: numeric, alphanumeric, byte (UTF-8),
53 * @param text the text to be encoded (not {@code null}), which can be any Unicode string
58 * containing the text, minimizing the bit length with respect to the constraints
59 * @throws NullPointerException if the text or error correction level is {@code null}
61 * @throws DataTooLongException if the text fails to fit in the maxVersion QR Code at the ECL
63 public static List<QrSegment> makeSegmentsOptimally(String text, QrCode.Ecc ecl, int minVersion, int maxVersion) {
65 Objects.requireNonNull(text);
72 int[] codePoints = toCodePoints(text);
83 if (version >= maxVersion) { // All versions in the range could not fit the given text
93 // Returns a new list of segments that is optimal for the given text at the given version number.
102 // Returns a new array representing the optimal mode per code point based on the given text and version.
184 // Returns a new list of segments based on the given text and modes, such that
243 * Returns a segment representing the specified text string encoded in kanji mode.
248 * @param text the text (not {@code null}), with only certain characters allowed
249 * @return a segment (not {@code null}) containing the text
254 public static QrSegment makeKanji(String text) {
255 Objects.requireNonNull(text);
257 text.chars().forEachOrdered(c -> {
263 return new QrSegment(Mode.KANJI, text.length(), bb.data, bb.bitLength);
273 * @param text the string to test for encodability (not {@code null})
278 public static boolean isEncodableAsKanji(String text) {
279 Objects.requireNonNull(text);
280 return text.chars().allMatch(