Skip to content

Main content

iCalendar Line Unfold Span Map

Unfold iCalendar CRLF followed by exactly one SP/HTAB and report removed source spans; unrelated line endings remain unchanged.

Loading tool…

Description

Unfold iCalendar CRLF followed by exactly one SP/HTAB and report removed source spans; unrelated line endings remain unchanged.

iCalendar separates content-line framing, property values, parameters and component nesting. TEXT escaping protects separators, while line folding is based on encoded octets. DATE, floating time, UTC and named-zone representations carry different information; a token-level operation does not resolve a timezone or expand recurrence rules.1

Unfold iCalendar CRLF followed by exactly one SP/HTAB and report removed source spans; unrelated line endings remain unchanged.

When to use this tool

Use this tool to unfold iCalendar CRLF followed by exactly one SP/HTAB and report removed source spans; unrelated line endings remain unchanged.

How to use the tool and how it works

  1. Enter text using the field definitions below.
  2. Run the operation. Correct input errors before interpreting an output.
  3. Read result.unfolded, result.removedSpans. Use the ordering, boundary rules and absence conditions described below.

Remove each CRLF followed by one space or tab and return the unfolded text plus removed half-open UTF-16 spans in the original text.2

Input fieldMeaning and unitsAccepted input
textTEXT-value or folded-content text under the stated operation; JSON escapes show actual backslashes and line endings.Text, at most 8,192 UTF-16 code units; the operation’s grammar also applies.
Output fieldInterpretation
resultObject containing the named fields below.
result.unfoldedText after removing CRLF plus one following space or tab.
result.removedSpansHalf-open UTF-16 spans removed from the original text.
json
{
  "input": {
    "text": "ab\r\n cd\r\n\te"
  },
  "output": {
    "result": {
      "unfolded": "abcde",
      "removedSpans": [
        [
          2,
          5
        ],
        [
          7,
          10
        ]
      ]
    }
  }
}

Limitations and assumptions

  • Only those folding sequences are removed; this does not parse or validate the resulting calendar content line.
  • Content spans use zero-based UTF-16 offsets; fold limits use UTF-8 bytes including the continuation space. Token helpers handle the stated subset only, without a timezone database, recurrence engine or calendar import.
  • Every declared top-level input field is required and unexpected fields are rejected. Ordinary strings are limited to 8,192 UTF-16 code units and lists to 128 entries, with tighter operation-specific bounds where stated. JSON text has bounded nesting and node counts.
  • Numeric outputs must be finite and no larger in absolute magnitude than the safe-integer limit; operations returning exact large integers use decimal text. Positions are zero-based and spans end exclusively unless the operation explicitly states a different convention.

Alternative or Complementary methods

Keep content-line syntax, value escaping and timezone interpretation separate. Use a complete iCalendar implementation for recurrence expansion, timezone transitions and property-specific validation.

References

  1. RFC 5545: Internet Calendaring and Scheduling Core Object Specification — RFC Editor

  2. Tool behavior and example: iCalendar Line Unfold Span Map — tool.io

Similar or alternative tools

  • iCalendar Content Line Name Parameter Split

    Split an unfolded iCalendar content line at its unquoted first colon and semicolon parameter boundaries; value remains opaque, raw parameters retain quote-aware spelling, no RFC 6868 decoding or component validation.

  • iCalendar Content Line Record Formatter

    Format one unfolded iCalendar content line from explicit raw already-encoded parameter/value tokens; rejects CRLF injection, no automatic TEXT escaping or RFC 6868 parameter encoding.