Rtrim

Remove trailing spaces from a string.

Syntax
      Rtrim(string)

Key
   string    A text string or string expression.

The Rtrim() function can be used in VBA or in an SQL query.

Rtrim() will return a Variant, you can also use Rtrim$() to return a String.
You should use Rtrim() if there is any chance of a Null value, since assigning Null to a String will raise an error.

Examples

Dim strDemo as String
strDemo = Rtrim("Talent is just a skill you're willing to practice      ")
Returns "Talent is just a skill you're willing to practice"

“The hands of every clock are shears, trimming us away scrap by scrap, and every time piece with a digital readout blinks us towards implosion” ~ Dean Koontz

Related

Right - Extract a substring from a string
LTrim - Remove leading spaces from a string.
Trim - Remove leading and trailing spaces from a string.


 
Copyright © 1999-2024 SS64.com
Some rights reserved