Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embed mIRC Color codes into a C# literal?

Tags:

c#

irc

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?

like image 645
FlySwat Avatar asked Sep 08 '09 02:09

FlySwat


1 Answers

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

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

'\x03'

Embedded in a string:

"blabla \x035,12to be colored text and background\x03 blabla"
like image 143
dtb Avatar answered Oct 02 '22 12:10

dtb