Browse Source

Make ConvertChar and ConvertString public.

newNRvisualizers
Daniel Grunwald 14 years ago
parent
commit
eb6f6c19c1
  1. 11
      ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs

11
ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs

@ -941,7 +941,11 @@ namespace ICSharpCode.NRefactory.CSharp @@ -941,7 +941,11 @@ namespace ICSharpCode.NRefactory.CSharp
return ConvertChar(ch);
}
static string ConvertChar(char ch)
/// <summary>
/// Gets the escape sequence for the specified character.
/// </summary>
/// <remarks>This method does not convert ' or ".</remarks>
public static string ConvertChar(char ch)
{
switch (ch) {
case '\\':
@ -973,7 +977,10 @@ namespace ICSharpCode.NRefactory.CSharp @@ -973,7 +977,10 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
static string ConvertString(string str)
/// <summary>
/// Converts special characters to escape sequences within the given string.
/// </summary>
public static string ConvertString(string str)
{
StringBuilder sb = new StringBuilder();
foreach (char ch in str) {

Loading…
Cancel
Save