Tweaked the comment for QrCode.encodeTextToSegment() in most language versions.

pull/4/head
Nayuki Minase 9 years ago
parent bd52bc3252
commit 3fda371340

@ -75,7 +75,7 @@ public:
/* /*
* Returns a QR Code segment representing the given Unicode text string. * Returns a QR segment representing the given Unicode text string.
*/ */
static QrSegment encodeTextToSegment(const char *text); static QrSegment encodeTextToSegment(const char *text);

@ -59,9 +59,9 @@ public final class QrCode {
/** /**
* Returns a QR Code segment representing the specified Unicode text string. * Returns a QR segment representing the specified Unicode text string.
* @param text the text to be encoded, which can be any Unicode string * @param text the text to be encoded, which can be any Unicode string
* @return a QR Code representing the text * @return a QR segment containing the text
* @throws NullPointerException if the text is {@code null} * @throws NullPointerException if the text is {@code null}
*/ */
public static QrSegment encodeTextToSegment(String text) { public static QrSegment encodeTextToSegment(String text) {

@ -69,7 +69,7 @@ def encode_text(text, ecl):
def encode_text_to_segment(text): def encode_text_to_segment(text):
"""Returns a QR Code segment representing the given Unicode text string.""" """Returns a QR segment representing the given Unicode text string."""
if not isinstance(text, str) and (sys.version_info[0] >= 3 or not isinstance(text, unicode)): if not isinstance(text, str) and (sys.version_info[0] >= 3 or not isinstance(text, unicode)):
raise TypeError("Text string expected") raise TypeError("Text string expected")
# Select the most efficient segment encoding automatically # Select the most efficient segment encoding automatically

Loading…
Cancel
Save