【发布时间】:2013-05-16 14:47:58
【问题描述】:
我正在通过 telnet 处理字典服务器,我希望它以这种格式返回:
**word** (wordType): wordDef wordDef wordDef wordDef
wordDef wordDef wordDef.
现在我正在输出代码:
write( my_socket, ("%s", word.data() ), word.length() ); // Bold this
write( my_socket, ("%s", theRest.data() ), theRest.length() );
所以我希望第一行加粗。
编辑
对不起,我忘了说这是一个命令行。
【问题讨论】:
-
恐怕字体的样式不能通过套接字发送。为什么不使用像“This text is bold”这样的 HTML 语法,接收方会检查这些标签并采取相应的行动。
-
嗯。它不会加粗代码 sn-p 中的文本。我应该在 Meta 上发布吗?
标签: c++ sockets networking formatting command-line-interface