Function Character Types Class

RTrimInPlace

"Right Trim In Place" Remove the trailing spaces from the string argument rValue and also return that value.

Signature (Visual Basic / VBA)

Public Function RTrimInPlace( _
    ByRef rValue As Variant _
    ) As Variant

Code Example

    Assuming
       Dim S As String
       S = "  This is a sample.  "
    for example
       RTrimInPlace(S) = "  This is a sample."
    leaves
       S = "  This is a sample."

Parameters

Parameter Description
rValue String argument which is to have its trailing space characters removed. Function also returns the "right-trimmed" value of rValue.

Notes & Version History

Note Function only works for characters in the ANSI Windows character set because it uses the built-in Visual Basic RTrim() function.