Function Reference


StringStripCR

Removes all carriage return values ( Chr(13) ) from a string.

StringStripCR ( "string" )

Parameters

string The string to convert.

Return Value

Returns the string with all instances of the @CR character ( Chr(13) ) removed.

Related

StringAddCR, StringIsSpace, StringStripWS

Example

#include <MsgBoxConstants.au3>

; A string with carriage return characters.
Local $sString = "This is a sentence " & @CR & "with " & Chr(13) & "whitespace."

; Strip all carriage return characters in the string.
Local $sStrippedString = StringStripCR($sString)

; Display the before and after string.
MsgBox($MB_SYSTEMMODAL, "", "Before: " & $sString & @CRLF & @CRLF & "After: " & $sStrippedString)