Returns a specified number of characters from the left side of a string. If length  is less than 1, the empty string is returned.

 

If length  is greater than or equal to the number of characters in string, the entire string is returned.

 

Syntax:

value = LeftCharacters( inputString, length )

OR

value = Left( inputString, length )     '   Short form usage: "Left"

 

Parameter:

Description:

inputString

String from which to extract the left-side characters.

length

Number of characters on the right side of text to extract.

value

Extracted characters.

 

Example:

value = LeftCharacters( "Hello", 3 ) '  Returns "Hel"
value = Left( "Hello", 2 )           '  Returns "He"
value = Left( "Hello", 40 )           '  Returns "Hello"

 

Results:

  See example comments.

 

Links:

MiddleCharacters, RightCharacters

See Also:

Data Groups and Types

 


Edit Time: 9/25/2017 09:09:54 AM


Topic ID#: 32

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software