Posted By

simoncoder on 09/29/18


Tagged

words strings split textBox


Versions (?)

Grab the first letter of each word in a textbox


 / Published in: VB.NET
 

This will grab just the first letter of each word from a textbox.

  1. Public Function getFLOW(ByVal mytext As String) As String
  2. Dim Initials As String = ""
  3. Dim AllWords() As String = mytext.Split(" "c)
  4. For Each Word As String In AllWords
  5. If Word.Length > 0 Then
  6. Initials = Initials & Word.Chars(0).ToString.ToUpper
  7. End If
  8. Next
  9. Return Initials
  10. End Function

Report this snippet  

You need to login to post a comment.