[#BloombergLP-bdlb-Print-printString] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/Print.adoc[Print]::printString :relfileprefix: ../../../ :mrdocs: Print to the specified `stream` the specified `string` of the specified `length` and return a reference providing modifiable access to `stream`. If the optionally specified `escapeBackSlash` flag is `true`, then all occurrences of the backslash character ('') in the `string` are escaped (i.e., expanded to "\") when written to the `stream`. Note that non‐printable characters in `string` will be printed in their hexadecimal representation ('xHH'). If `stream` is not valid on entry, this operation has no effect. The behavior is undefined unless `0 <= length`. == Synopsis Declared in `<bdlb_print.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static std::ostream& printString( std::ostream& stream, char const* string, int length, bool escapeBackSlash = false); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#