ayhoung 0 Posted May 1, 2013 Report Share Posted May 1, 2013 Hi everyone! I was wondering if anyone had a good way to implement a function similar to the explode mechanism in PHP? For example, if I have a sentence of items:apples, oranges, pears And I want to turn it into a list:(0) apples(1) oranges(2) pears How would I go about implementing this? It might be something simple I'm missing. Any help would be appreciated! Quote Link to post Share on other sites
merkaba 36 Posted May 1, 2013 Report Share Posted May 1, 2013 ui text box("List", #list) ui button("Add") { add list to list(%list, $list from text(#list, ","), "Delete", "Global") set(#list, "", "Global") } Here's a simple example. Add the string "apples,oranges,pears" to the text box, hit "add" and done. View > Debugger to see it populate the list. text_to_list.ubot 2 Quote Link to post Share on other sites
ayhoung 0 Posted May 1, 2013 Author Report Share Posted May 1, 2013 thanks a lot!! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.