Created
March 27, 2016 18:32
-
-
Save mcanvar/78e695781c4b83043d1c to your computer and use it in GitHub Desktop.
Function that returns first word of the string.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function firstWord(string As String) As String | |
If String.IsNullOrEmpty(string) Then Return String.Empty | |
Dim words As String() = string.Split(" ") | |
Return words(0) | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment