Embed mIRC Color codes into a C# literal?

后端 未结 4 455
执笔经年
执笔经年 2021-02-04 11:27

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

4条回答
  •  心在旅途
    2021-02-04 12:01

    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"
    

提交回复
热议问题