Performs escaping for escapeSchemeKind Block for unparsing.
Performs escaping appropriate when escapeSchemeKind is Character for unparsing.
This function takes in a list of matches (in an ArrayBuffer for constant append and random access) and returns the match that starts earliest in the data.
This function takes in a list of matches (in an ArrayBuffer for constant append and random access) and returns the match that starts earliest in the data. If multiple matches start at the same point in the data, the match with the longer delimiter length is used as a tie breaker
When 'escapeCharacter': On unparsing a single character of the data is escaped by adding an dfdl:escapeCharacter before it. The following are escaped if they are in the data:
- Any in-scope terminating delimiter by escaping its first character. - dfdl:escapeCharacter (escaped by dfdl:escapeEscapeCharacter) - Any dfdl:extraEscapedCharacters
When 'escapeBlock': On unparsing the entire data are escaped by adding dfdl:escapeBlockStart to the beginning and dfdl:escapeBlockEnd to the end of the data. The data is either always escaped or escaped when needed as specified by dfdl:generateEscapeBlock. If the data is escaped and contains the dfdl:escapeBlockEnd then first character of each appearance of the dfdl:escapeBlockEnd is escaped by the dfdl:escapeEscapeCharacter.