[#BloombergLP-bdlde-QuotedPrintableEncoder-2constructor-0d]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlde.adoc[bdlde]::xref:BloombergLP/bdlde/QuotedPrintableEncoder.adoc[QuotedPrintableEncoder]::QuotedPrintableEncoder
:relfileprefix: ../../../
:mrdocs:

Create a Quoted&hyphen;Printable encoder with optional line&hyphen;break settings&period;

== Synopsis

Declared in `&lt;bdlde&lowbar;quotedprintableencoder&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
QuotedPrintableEncoder(
    xref:BloombergLP/bdlde/QuotedPrintableEncoder/LineBreakMode-0d.adoc[LineBreakMode] lineBreakMode = e&lowbar;CRLF&lowbar;MODE,
    int maxLineLength = k&lowbar;DEFAULT&lowbar;MAX&lowbar;LINELEN,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

== Description

Create a Quoted&hyphen;Printable encoder in the initial state, configured to accept hard line breaks based on the optionally specified `lineBreakMode`, and to insert soft line breaks when the line length exceeds the optionally specified `maxLineLength` (default is the RFC 2045 maximum 76)&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period; The behavior is undefined unless `4 &lt;&equals; maxLineLength &lt;&equals; 76`&period; Note that e&lowbar;CRLF&lowbar;MODE passes &grave;&bsol;r &grave; straight to output and converts &grave; `&semi; e&lowbar;LF&lowbar;MODE passes `
&grave; and converts `r`&semi; e&lowbar;MIXED&lowbar;MODE passes both &grave;&bsol;r
` and `
&grave;&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *lineBreakMode*
| how hard line breaks in the input are handled
| *maxLineLength*
| maximum output line length before a soft break
| *basicAllocator*
| allocator used to supply memory
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
