ClassMicrosoft.VisualBasic.Strings SyntaxDim result As String = Right(str, length)
DescriptionThe Right function returns a string containing the rightmost length characters of str. Usage at a Glance
ExampleThe following example uses the Right function to ensure that a directory path ends with a "\" character. Public Function ProperDirectory(origPath As String) As String If (Right(origPath, 1) = "\") Then Return origPath Else Return origPath & "\" End If End Function See AlsoLeft Function, Mid Function |