WSPutUTF8Symbol (C 函数)
int WSPutUTF8Symbol(WSLINK link,const unsigned char *s,int len)
把由 UTF-8 编码的字符串 s 给定名称且具有长度 len 的符号写入由 link 指定的 WSTP 连接.
范例
基本范例 (1)
#include "wstp.h"
/* send the symbol $HomeDirectory to a link */
void f(WSLINK lp)
{
unsigned char symb[14];
symb[0] = '$';
symb[1] = 'H';
symb[2] = 'o';
symb[3] = 'm';
symb[4] = 'e';
symb[5] = 'D';
symb[6] = 'i';
symb[7] = 'r';
symb[8] = 'e';
symb[9] = 'c';
symb[10] = 't';
symb[11] = 'o';
symb[12] = 'r';
symb[13] = 'y';
if(! WSPutUT8Symbol(lp, (const unsigned char *)symb, 14))
{ /* unable to put the symbol to lp */ }
}