mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-26 17:55:52 +00:00
Added new _STRCMP and _STRICMP commands for quick string comparisons. Cleaned up QB64 to finish removing the QUI (quick user insert) code and folders. Altered UCASE and LCASE routines to be faster in some situations for us.
38 lines
1 KiB
Plaintext
38 lines
1 KiB
Plaintext
The {{KW|RTRIM$}} function removes trailing space characters from a {{KW|STRING}} value.
|
|
|
|
|
|
{{PageSyntax}}
|
|
:{{parameter|return$}} = {{KW|RTRIM$}}({{Parameter|value$}})
|
|
|
|
|
|
{{PageDescription}}
|
|
* {{Parameter|value$}} is the {{KW|STRING}} value to trim.
|
|
* If {{Parameter|value$}} contains no trailing space characters, {{Parameter|value$}} is returned unchanged.
|
|
* Convert fixed length {{KW|STRING}} values by using a different {{parameter|return$}} variable.
|
|
|
|
|
|
|
|
{{PageExamples}}
|
|
Trimming a fixed length string value for use by another string variable:
|
|
{{CodeStart}}
|
|
name$ = {{Cl|RTRIM$}}(contact.name) ' trims spaces from end of fixed length {{Cl|TYPE}} value.
|
|
{{CodeEnd}}
|
|
|
|
Trimming text string ends:
|
|
{{CodeStart}}{{Cl|PRINT}} {{Cl|RTRIM$}}("some text") + "."
|
|
{{Cl|PRINT}} {{Cl|RTRIM$}}("some text ") + "."
|
|
{{Cl|PRINT}} {{Cl|RTRIM$}}("Tommy ")
|
|
{{CodeEnd}}
|
|
{{OutputStart}}some text.
|
|
some text.
|
|
Tommy
|
|
{{OutputEnd}}
|
|
|
|
|
|
{{PageSeeAlso}}
|
|
* {{KW|LTRIM$}}, {{KW|STR$}}
|
|
|
|
* {{KW|LSET}}, {{KW|RSET}}
|
|
|
|
|
|
{{PageNavigation}} |