mirror of
https://github.com/AssetRipper/Cpp2IL.git
synced 2026-11-13 12:41:25 -10:00
14 lines
355 B
C#
14 lines
355 B
C#
namespace Cpp2IL.Core.Extensions;
|
|
|
|
public static class StringExtensions
|
|
{
|
|
public static string EscapeString(this string str)
|
|
=> str
|
|
.Replace("\\", @"\\")
|
|
.Replace("\"", "\\\"")
|
|
.Replace("\n", "\\n")
|
|
.Replace("\r", "\\r")
|
|
.Replace("\t", "\\t")
|
|
.Replace("\0", "\\0");
|
|
}
|