GetChar Function

   
GetChar Function

Class

Microsoft.VisualBasic.Strings

Syntax

 GetChar(   str   ,   index   ) 
str (required; String)

The string from which to extract a character

index (required; Integer)

Position of character (1-based)

Return Value

A Char containing the character at position index

Description

Returns the character that is at position index within a given string

Rules at a Glance

  • The first character in str is at index 1.

  • If index exceeds the number of character positions in str , an error is generated.

VB.NET/VB 6 Differences

The GetChar function is new to VB.NET.

See Also

InStr Function, Left Function, Mid Function, Right Function

   


VB.Net Language in a Nutshell
VB.NET Language in a Nutshell
ISBN: B00006L54Q
EAN: N/A
Year: 2002
Pages: 503

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