# Function Reference

# StringAddCR

Takes a string and prefixes all linefeed characters ( Chr(10) ) with a carriage return character ( Chr(13) ).

StringAddCR ( "string" )

## Parameters

string | The string to convert.

## Return Value

Returns the string with all instances of linefeed characters ( @LF ) prefixed with a carriage return character ( @CR ).

## Related

StringReplace, StringStripCR

## Example

    #include <MsgBoxConstants.au3>

    ; Add the carriage return charcter to all the line feed characters in the string.
    Local $sString = StringAddCR("This is a sentence " & @LF & "with " & Chr(10) & "whitespace.")
    MsgBox($MB_SYSTEMMODAL, "", $sString)