嵌入mIRC的颜色代码为C#的文字? [英] Embed mIRC Color codes into a C# literal?

查看:148
本文介绍了嵌入mIRC的颜色代码为C#的文字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作在C#一个简单的IRC机器人,我无法弄清楚如何嵌入粗体/颜色等成字符串典型的mIRC的控制代码。

I'm working on a simple irc bot in C#, and I can't figure out how to embed the typical mirc control codes for bold/color etc into string literals.

有人能指出我对如何做到这一点?

Can someone point me towards how to do this?

推荐答案

在mIRC的颜色代码的格式描述的here 。我想你问如何嵌入 ^ C字符串中的

The mIRC color code format is described here. I guess you're asking how to embed a ^C in a string.

这就是所谓的Caret符号。据 C0和C1控制码中的 ^ C

This is known as Caret notation. According to C0 and C1 control codes, ^C is:

'\x03'

嵌入在一个字符串:

"blabla \x035,12to be colored text and background\x03 blabla"

这篇关于嵌入mIRC的颜色代码为C#的文字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆