Hi @StewartBW ,
You can use the Where
method from LINQ along with Trim
to remove fields that contain only spaces.
Imports System.Linq
Dim MyString As String = ";full; ;title"
Dim MyFinal As String() = MyString.Split(New Char() {";"c}, StringSplitOptions.RemoveEmptyEntries).Where(Function(s) s.Trim() <> "").ToArray()
Best Regards.
Jiachen Li
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.