Ignoring Formatting Characters – JS

Index

    Ignoring Formatting Characters

    EDIFileScrubber offers the ability to ignore certain strings that trail segments (X12). These extra characters are sometimes used for formatting an EDI file. For example, some companies may place a return character so that an EDI file may look a little better. While processing an EDI file these characters may cause a parser to fail. By setting the TrimString property of the EDIFileScrubber these extra characters will be ignored.

    Example 1

    // Ignore all return characters at the end of a segment
    scrubber.TrimString = “\n”;

    Example 2

    // Ignore all carriage returns characters at the end of a segment
    scrubber.TrimString = “\r\n”;
    in EDI File Scrubber – JS
    Did this article answer your question?