EscapeControlChars() public static method

Converts any control characters in a string to their escaped representation.
public static EscapeControlChars ( string s ) : string
s string The string to be converted
return string
Example #1
0
 public static void EscapeNullCharInString()
 {
     Assert.That(MsgUtils.EscapeControlChars("\0"), Is.EqualTo("\\0"));
 }
Example #2
0
 public static void EscapeControlCharsTest(string input, string expected)
 {
     Assert.That(MsgUtils.EscapeControlChars(input), Is.EqualTo(expected));
 }