B4J Question How To Remove An Index Of String Array

adjie

Member
Licensed User
Longtime User
Hello,

Here is my situation :

Code: Copy
dim cInput = "A,B,C"
dim cData() as string  = Regex.Split(",", cInput)

it returns
Code: Copy
  cData(0) = "A"
  cData(1) = "B"
  cData(2) = "C"
Now I want to remove cData(2) without editing the cInput, anyone can help, please ?
 
Last edited:
Instead of using a string array you could use a List.
Code: Copy
Dim cInput = "A,B,C"
Dim cData As List
cData.Initialize
cData.AddAll(Regex.Split(",", cInput))
cData.RemoveAt(2)
 
Upvote 0
Back
Top