Difference between revisions of "LTRIM$"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
m (reword)
imported>Clippy
m
Line 10: Line 10:
* If {{Parameter|value$}} contains no leading space characters, {{Parameter|value$}} is returned unchanged.
* If {{Parameter|value$}} contains no leading space characters, {{Parameter|value$}} is returned unchanged.
* Convert fixed length {{KW|STRING}} values by using a different {{parameter|return$}} variable.
* Convert fixed length {{KW|STRING}} values by using a different {{parameter|return$}} variable.
* Can be used to trim a positive numerical value converted to a string value by {{KW|STR$}}.
* Can be used to trim the leading space of a positive numerical value converted to a string value by {{KW|STR$}}.





Revision as of 20:16, 1 March 2010

The LTRIM$ function removes leading space characters from a STRING value.


Syntax

return$ = LTRIM$(value$)


Description

  • value$ is the STRING value to trim.
  • If value$ contains no leading space characters, value$ is returned unchanged.
  • Convert fixed length STRING values by using a different return$ variable.
  • Can be used to trim the leading space of a positive numerical value converted to a string value by STR$.


Examples

Trimming a fixed length string value for use by another string variable:

name$ = LTRIM$(contact.name) ' trims spaces from front of fixed length TYPE value.


Trimming a positive string number:

number$ = LTRIM$(STR$(value))


Trimming text strings:

PRINT LTRIM$("some text") PRINT LTRIM$(" some text")

some text some text


See also



Navigation:
Keyword Reference - Alphabetical
Keyword Reference - By Usage
Main Wiki Page