Skip to content

Instantly share code, notes, and snippets.

@mcanvar
Created March 27, 2016 18:34
Show Gist options
  • Save mcanvar/57ed2f15c6152af574bb to your computer and use it in GitHub Desktop.
Save mcanvar/57ed2f15c6152af574bb to your computer and use it in GitHub Desktop.
Function that returns first word of the string.
Function lastWord(string As String) As String
If String.IsNullOrEmpty(string) Then Return String.Empty
Dim words As String() = string.Split(" ")
Return words.Last
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment