Split Numbers 1234 into 12 & 34
in
Core Library Questions
•
2 years ago
I need to split four consecutive numbers into two numbers (proHTML drops punctuation from data Im scraping, the original data is in format 12.34). Slit, SplitTokens, & Trim require some token or space to work with. I thought I might be able to convert the string into list and then use subset to extract the two numbers. Is there a processing.org programmatic equivalent to rtrim or ltrim?
When I try methods to use subset, I'm getting cannot convert string[] to string errors. Any suggestions?
When I try methods to use subset, I'm getting cannot convert string[] to string errors. Any suggestions?
- tempstring = htmlList.pageList.get(i+1).toString(); // store the next record into tempstring.
- String[] p = new String[1];
- p[0] = tempstring;
- String p1 = subset(p,0,1); String p2 = subset(p,1,3);
- pressure = p1 + "." + p2;
1