RTRIM$: Difference between revisions
Jump to navigation
Jump to search
Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
The | The [[RTRIM$]] function removes trailing space characters from a [[STRING]] value. | ||
{{PageSyntax}} | {{PageSyntax}} | ||
:{{parameter|return$}} = | :{{parameter|return$}} = [[RTRIM$]]({{Parameter|value$}}) | ||
{{PageDescription}} | {{PageDescription}} | ||
* {{Parameter|value$}} is the | * {{Parameter|value$}} is the [[STRING]] value to trim. | ||
* If {{Parameter|value$}} contains no trailing space characters, {{Parameter|value$}} is returned unchanged. | * If {{Parameter|value$}} contains no trailing space characters, {{Parameter|value$}} is returned unchanged. | ||
* Convert fixed length | * Convert fixed length [[STRING]] values by using a different {{parameter|return$}} variable. | ||
Line 31: | Line 31: | ||
{{PageSeeAlso}} | {{PageSeeAlso}} | ||
* | * [[LTRIM$]], [[STR$]] | ||
* | * [[LSET]], [[RSET]] | ||
{{PageNavigation}} | {{PageNavigation}} |
Revision as of 00:54, 25 January 2023
The RTRIM$ function removes trailing space characters from a STRING value.
Syntax
- return$ = RTRIM$(value$)
Description
- value$ is the STRING value to trim.
- If value$ contains no trailing space characters, value$ is returned unchanged.
- Convert fixed length STRING values by using a different return$ variable.
Examples
Trimming a fixed length string value for use by another string variable:
name$ = RTRIM$(contact.name) ' trims spaces from end of fixed length TYPE value. |
Trimming text string ends:
PRINT RTRIM$("some text") + "." PRINT RTRIM$("some text ") + "." PRINT RTRIM$("Tommy ") |
some text. some text. Tommy |
See also