public static GetCharEscapeFlags ( StringEscapeHandling stringEscapeHandling, char quoteChar ) : bool[] | ||
stringEscapeHandling | StringEscapeHandling | |
quoteChar | char | |
Résultat | bool[] |
// Token: 0x06000DD8 RID: 3544 RVA: 0x00050A4C File Offset: 0x0004EC4C public static string ToEscapedJavaScriptString([Nullable(2)] string value, char delimiter, bool appendDelimiters, StringEscapeHandling stringEscapeHandling) { bool[] charEscapeFlags = JavaScriptUtils.GetCharEscapeFlags(stringEscapeHandling, delimiter); string result; using (StringWriter stringWriter = StringUtils.CreateStringWriter((value != null) ? value.Length : 16)) { char[] array = null; JavaScriptUtils.WriteEscapedJavaScriptString(stringWriter, value, delimiter, appendDelimiters, charEscapeFlags, stringEscapeHandling, null, ref array); result = stringWriter.ToString(); } return(result); }
public static string ToEscapedJavaScriptString(string value, char delimiter, bool appendDelimiters, StringEscapeHandling stringEscapeHandling) { string str; bool[] charEscapeFlags = JavaScriptUtils.GetCharEscapeFlags(stringEscapeHandling, delimiter); using (StringWriter stringWriter = StringUtils.CreateStringWriter((value != null ? value.Length : 16))) { char[] chrArray = null; JavaScriptUtils.WriteEscapedJavaScriptString(stringWriter, value, delimiter, appendDelimiters, charEscapeFlags, stringEscapeHandling, null, ref chrArray); str = stringWriter.ToString(); } return(str); }
public static string ToEscapedJavaScriptString( string value, char delimiter, bool appendDelimiters, StringEscapeHandling stringEscapeHandling) { bool[] charEscapeFlags = JavaScriptUtils.GetCharEscapeFlags(stringEscapeHandling, delimiter); using (StringWriter stringWriter = StringUtils.CreateStringWriter(StringUtils.GetLength(value) ?? 16)) { char[] writeBuffer = (char[])null; JavaScriptUtils.WriteEscapedJavaScriptString((TextWriter)stringWriter, value, delimiter, appendDelimiters, charEscapeFlags, stringEscapeHandling, (IArrayPool <char>)null, ref writeBuffer); return(stringWriter.ToString()); } }