xo::ical proc reflow_content_line (public)

 xo::ical[i] reflow_content_line text

Defined in packages/xotcl-core/tcl/01-debug-procs.tcl

Perform line folding: According to RFC 5545 section 3.1, SHOULD NOT be longer than 75 octets, excluding the line break. https://www.ietf.org/rfc/rfc5545.txt

Parameters:
text (required)

Testcases:
No testcase defined.
Source code:
#
# Perform line folding: According to RFC 5545 section 3.1,
# SHOULD NOT be longer than 75 octets, excluding the line break.
# https://www.ietf.org/rfc/rfc5545.txt
#
if {[string length $text] > 73} {
  set lines ""
  while {[string length $text] > 73} {
    append lines [string range $text 0 73] \r\n " "
    set text [string range $text 74 end]
  }
  append lines $text
  set text $lines
}
return $text
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: