Class WhitespaceTreatments
How to handle whitespace when encountered during parsing.
Allows for automatic removal of leading or trailing whitespace in or outside of values or headers, depending on whether in an escaped sequence.
Inheritance
Namespace: Cesil
Assembly: Cesil.dll
Syntax
public sealed class WhitespaceTreatments : Enum
Fields
Preserve
Leave whitespace untouched, if in a value or header it will be preserved, if before or after an escaped value or header it will result in an error.
Declaration
public const WhitespaceTreatments Preserve
Field Value
Type | Description |
---|---|
WhitespaceTreatments |
Trim
Combines TrimInValues and TrimBetweenValues.
Declaration
public const WhitespaceTreatments Trim
Field Value
Type | Description |
---|---|
WhitespaceTreatments |
TrimAfterValues
Removes whitespace after a value or header.
For unescaped values this behaves the same as TrimTrailingInValues.
For escaped values, only whitespace after the end of escaped value will be removed.
Declaration
public const WhitespaceTreatments TrimAfterValues
Field Value
Type | Description |
---|---|
WhitespaceTreatments |
TrimBeforeValues
Removes whitespace before a value or header.
For unescaped values this behaves the same as TrimLeadingInValues.
For escaped values, only whitespace before the start of escaped value will be removed.
Declaration
public const WhitespaceTreatments TrimBeforeValues
Field Value
Type | Description |
---|---|
WhitespaceTreatments |
TrimBetweenValues
Combines TrimBeforeValues and TrimAfterValues.
Declaration
public const WhitespaceTreatments TrimBetweenValues
Field Value
Type | Description |
---|---|
WhitespaceTreatments |
TrimInValues
Combines TrimLeadingInValues and TrimTrailingInValues.
Declaration
public const WhitespaceTreatments TrimInValues
Field Value
Type | Description |
---|---|
WhitespaceTreatments |
TrimLeadingInValues
Removes whitespace that is at the start of a value or header.
For unescaped values this behaves the same as TrimBeforeValues.
For escaped values this removed leading whitespace.
Declaration
public const WhitespaceTreatments TrimLeadingInValues
Field Value
Type | Description |
---|---|
WhitespaceTreatments |
TrimTrailingInValues
Removes whitespace that follows a value or header.
For unescaped values this behaves the same as TrimAfterValues.
Leading whitespace in escaped values and headers will be removed.
Declaration
public const WhitespaceTreatments TrimTrailingInValues
Field Value
Type | Description |
---|---|
WhitespaceTreatments |
value__
Declaration
public byte value__
Field Value
Type | Description |
---|---|
System.Byte |