次の方法で共有


RTRIM( ) Function

Removes all trailing spaces or parsing characters from the specified character expression, or all trailing zero (0) bytes from the specified binary expression.

RTRIM(cExpression [, nFlags] [, cParseChar [, cParseChar2 [, ...]]])

Parameters

  • cExpression
    Specifies an expression of Character or Varbinary type to remove all trailing spaces or 0 bytes from, respectively.

  • nFlags
    Specifies if trimming is case-sensitive when one or more parse characters (cParseChar, cParseChar2, … are included. Trimming is case-sensitive if nFlags is zero or is omitted. Trimming is case-insensitive if nFlags 1.

  • cParseChar [, cParseChar2 [, ...]]
    Specifies one or more character strings that are trimmed from the end of cExpression. If cParseChar isn't included, then trailing spaces or 0 bytes are removed from Expression.

    Note   The maximum number of strings permitted in cParseChar is 23.

Return Value

Character or Varbinary. RTRIM( ) returns the specified expression without trailing spaces or parsing characters, or 0 bytes.

Remarks

You can use RTRIM( ) to ensure that trailing spaces or leading and trailing zero (0) bytes are removed from data entered by a user. RTRIM( ) is identical to TRIM( ).

Example

CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')
USE customer  && Opens Customer table
CLEAR
? 'The contact for '+ RTRIM(company) + ' is ' + contact

See Also

Reference

ALLTRIM( ) Function

LTRIM( ) Function

TRIM( ) Function

Other Resources

Functions