C# Class ExoMerge.Aspose.DocumentTokenCleanser

A class that provides options for cleansing document tokens.
Mostrar archivo Open project: vc3/ExoMerge

Public Methods

Method Description
Cleanse ( string tokenValue ) : string

Cleanse the given raw text by replacing MS Word fancy quote characters with standard quote characters, as well as auto-escaping as needed.

This is needed because Word by default doesn't make it easy or intuitive to insert standard quote characters. Since the outer quotes in an expression's text are likely expected to be standard quotes, it may be preferable to automatically convert them. If unescaped standard quotes are used within fancy quotes, they are auto-escaped. Escaped fancy quotes are automatically unescaped. The end result is that quotes only have to be explicitly escaped if they are enclosed within a pair of the same kind of quotes.

Method Details

Cleanse() public static method

Cleanse the given raw text by replacing MS Word fancy quote characters with standard quote characters, as well as auto-escaping as needed.
This is needed because Word by default doesn't make it easy or intuitive to insert standard quote characters. Since the outer quotes in an expression's text are likely expected to be standard quotes, it may be preferable to automatically convert them. If unescaped standard quotes are used within fancy quotes, they are auto-escaped. Escaped fancy quotes are automatically unescaped. The end result is that quotes only have to be explicitly escaped if they are enclosed within a pair of the same kind of quotes.
public static Cleanse ( string tokenValue ) : string
tokenValue string The raw token value.
return string