J JNG Member Licensed User Nov 15, 2016 #1 Hi! I have Following String Dim Val as string = "60Dip,100%x-54%x-60Dip,18%x,18%x,18%x" DIM Lval() as Int How can I convert and store these value as int in Lval() Regards Last edited: Nov 15, 2016
Hi! I have Following String Dim Val as string = "60Dip,100%x-54%x-60Dip,18%x,18%x,18%x" DIM Lval() as Int How can I convert and store these value as int in Lval() Regards
Erel B4X founder Staff member Licensed User Longtime User Nov 15, 2016 #2 Please use [code]code here...[/code] tags when posting code. Where does the string come from? Why do you need to do it at runtime? You need more than a simple parsing code. You need to evaluate the expressions. Check this (it doesn't support dip and percentage units): https://www.b4x.com/android/forum/threads/54629/#content Upvote 0
Please use [code]code here...[/code] tags when posting code. Where does the string come from? Why do you need to do it at runtime? You need more than a simple parsing code. You need to evaluate the expressions. Check this (it doesn't support dip and percentage units): https://www.b4x.com/android/forum/threads/54629/#content