S
SIS01
Hi,
Please helpme
I want to split this line:
string line = "Davis , Jones, Beckett , Jordan , Kennt "
into an array of their trimmed versions:
"Davis"
"Jones"
"Beckett"
"Jordan"
"Kennt"
I've tried several solutions but none resolves it.
Dim linea As String = "Davis , Jones, Beckett , Jordan , Kennt "
Dim delimiter As String = ","
Dim nombress As String() = linea.Split(delimiter.ToCharArray())
Array.ForEach(nombress, Function(p) p.Trim()) ' does not work
Array.ForEach(nombress, Function(p) WriteLine("action: -" & p & " - "))
Array.ConvertAll(nombress, New Converter(Of String, String)(Function(c)
c.Trim())) ' does not work
Array.ForEach(nombress, Function(p) WriteLine("action: -" & p & " - "))
For Each n In nombress
n = n.Trim ' does not work
Next
Array.ForEach(nombress, Function(p) WriteLine("action: -" & p & " - "))
Thanks in advance
Please helpme
I want to split this line:
string line = "Davis , Jones, Beckett , Jordan , Kennt "
into an array of their trimmed versions:
"Davis"
"Jones"
"Beckett"
"Jordan"
"Kennt"
I've tried several solutions but none resolves it.
Dim linea As String = "Davis , Jones, Beckett , Jordan , Kennt "
Dim delimiter As String = ","
Dim nombress As String() = linea.Split(delimiter.ToCharArray())
Array.ForEach(nombress, Function(p) p.Trim()) ' does not work
Array.ForEach(nombress, Function(p) WriteLine("action: -" & p & " - "))
Array.ConvertAll(nombress, New Converter(Of String, String)(Function(c)
c.Trim())) ' does not work
Array.ForEach(nombress, Function(p) WriteLine("action: -" & p & " - "))
For Each n In nombress
n = n.Trim ' does not work
Next
Array.ForEach(nombress, Function(p) WriteLine("action: -" & p & " - "))
Thanks in advance