Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Find & Remove String From List
#5
after looking further this is a better way to go converts to array finds item and removes it then converts back to multiline string

Macro Example String Replacement
Code:
Copy      Help
;;;simulates the info received from webpage
str accountList = "account1[]account2[]account3[]account4[]account5"
str getAccount  = "account5"

ARRAY(str) arr
int i nt
nt = tok(accountList arr)
for(i 0 nt)
,if arr[i]= getAccount
,,int rs=i
arr.remove(rs)    
accountList=arr
accountList.trim
out accountList


Messages In This Thread
Find & Remove String From List - by BJ - 06-26-2018, 03:01 PM
RE: Find & Remove String From List - by BJ - 06-26-2018, 04:20 PM
RE: Find & Remove String From List - by Kevin - 06-26-2018, 04:21 PM
RE: Find & Remove String From List - by BJ - 06-26-2018, 04:22 PM
RE: Find & Remove String From List - by Kevin - 06-26-2018, 04:56 PM
RE: Find & Remove String From List - by BJ - 06-26-2018, 05:18 PM
RE: Find & Remove String From List - by Kevin - 06-26-2018, 06:10 PM
RE: Find & Remove String From List - by BJ - 06-26-2018, 06:58 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)