Encoding UtilsRestricted Escape Method
This method is used to replace carriage returns, line feeds, and backslashes within the string with
an appropriate escape sequence (\r \n \\). Commas and semi-colons are not escaped by this method.
Definition
Namespace: EWSoftware.PDI
Assembly: EWSoftware.PDI.Data (in EWSoftware.PDI.Data.dll) Version: 2025.1.9.0
The escaped string
Assembly: EWSoftware.PDI.Data (in EWSoftware.PDI.Data.dll) Version: 2025.1.9.0
C#
public static string? RestrictedEscape(
this string? escapeText
)VB
<ExtensionAttribute>
Public Shared Function RestrictedEscape (
escapeText As String
) As StringC++
public:
[ExtensionAttribute]
static String^ RestrictedEscape(
String^ escapeText
)F#
[<ExtensionAttribute>]
static member RestrictedEscape :
escapeText : string -> string Parameters
- escapeText String
- The string to escape
Return Value
StringThe escaped string
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Remarks
This is mainly for vCard 2.1 properties in which commas and semi-colons should not be
escaped.