<< 向前        下一页 >>

ID : 9156

Right

Function

To return a string of the specified number of characters from the right end.

Syntax

Right(string, number of characters)

Guaranteed entry

String
Designate 字符串型 data.
Number of characters
Specify the number of characters from the right end by 整数型 data.

Return value

字符串型 data.

Description

A string of the specified number of characters from the right end is returned.

Related Terms

Asc, Chr, SprintF, Left, Len, Mid, Val, InStr, Bin

Attention

-

Example

'!TITLE "Acquiring Designated Number of Characters from Right End of String"
' Acquire 3 characters from the right end of a string "abcdefg"
Sub Sample_Right

  Dim aaa As String

  ' Assign 3 characters from the right end of a string "abcdefg" to aaa
  aaa = Right( "abcdefg", 3 )

  ' Display "efg" on the message output window
  PrintDbg aaa

End Sub

ID : 9156

<< 向前        下一页 >>