WSPutUTF8String (C 関数)
int WSPutUTF8String(WSLINK link,const unsigned char *s,int len)
len バイトのUTF-8文字列s をlink で指定されたWSTP接続に置く.
例題
例 (1)
#include "wstp.h"
/* send an Integrate[] expression to a link */
void f(WSLINK lp)
{
unsigned char *expr = "Integrate[1/Sin[x],x]";
if(! WSPutFunction(lp, "EvaluatePacket", 1))
{ /* unable to send the function to lp */ }
if(! WSPutFunction(lp, "ToExpression", 1))
{ /* unable to send the function to lp */ }
if(! WSPutUTF8String(lp, (const unsigned char *)expr, 21))
{ /* unable to send the expression to lp */ }
if(! WSEndPacket(lp))
{ /* unable to send the end-of-packet indicator to lp */ }
if(! WSFlush(lp))
{ /* unable to flush any buffered outgoing data to lp */ }
}