Left Function


Left Function

Class

Microsoft.VisualBasic.Strings

Syntax

     Dim result As String = Left(str, length) 


str (required; String)

The string to be processed


length (required; Long)

The number of characters to return from the left portion of the string

Description

The Left function returns a string containing the leftmost length characters of str.

Usage at a Glance

  • If length is 0, a zero-length string is returned.

  • If length is greater than the length of str, str is returned.

  • If length is less than zero or is Nothing, an error is generated.

  • If str is Nothing, Left returns Nothing.

  • Because of naming conflicts, you may have to preface this function with the name of the Microsoft.VisualBasic namespace.

  • Use the Len function to determine the overall length of str.

See Also

Mid Function, Right Function




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net