/**
* Create a symbol from the string. The library automatically parses the input
* string and encodes in a QR Code symbol.
* @warning This function is THREAD UNSAFE when pthread is disabled.
* @param string input string. It must be NUL terminated.
* @param version version of the symbol. If 0, the library chooses the minimum
* version for the given input data.
* @param level error correction level.
* @param hint tell the library how Japanese Kanji characters should be
* encoded. If QR_MODE_KANJI is given, the library assumes that the
* given string contains Shift-JIS characters and encodes them in
* Kanji-mode. If QR_MODE_8 is given, all of non-alphanumerical
* characters will be encoded as is. If you want to embed UTF-8
* string, choose this. Other mode will cause EINVAL error.
* @param casesensitive case-sensitive(1) or not(0).
* @return an instance of QRcode class. The version of the result QRcode may
* be larger than the designated version. On error, NULL is returned,
* and errno is set to indicate the error. See Exceptions for the
* details.
* @throw EINVAL invalid input object.
* @throw ENOMEM unable to allocate memory for input objects.
* @throw ERANGE input data is too large.
*/
extern QRcode *QRcode_encodeString(const char *string,
int version,
QRecLevel level,
QRencodeMode hint,
int casesensitive);
/* *
从字符串中创建一个符号。库会自动解析输入
*字符串和二维码符号编码。
当pthread被禁用时,这个函数是线程不安全的。
* @param string 输入字符串。它必须无条件终止。
* @param version 的符号版本。如果为0,则库选择最小值给定输入数据的版本。
* @param level 矫正等级。
* @param hint 告诉库汉字应该是什么样子编码。如果给定QR_MODE_KANJI,
* 则库假设给定字符串包含Shift-JIS字符并对其进行编码
* Kanji-mode。如果QR_MODE_8给定,则全部是非字母数字的
*字符将按原样编码。如果你想嵌入UTF-8
*字符串,选择这个。其他模式会导致连续错误。
* @param casesensitive (1)或不(0)
返回一个QRcode类的实例。结果的版本可能是QRcode
*大于指定版本。错误时,返回NULL,
和errno设置来表示错误。请参阅下列异常
*细节。
* @throw EINVAL无效输入对象。
* @throw ENOMEM无法为输入对象分配内存。
* @throw ERANGE输入数据太大。
*/
extern QRcode *QRcode_encodeString(const char *string,
int version,
QRecLevel level,
QRencodeMode hint,
int casesensitive);