Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String productLine="1.00 REFRESCO COLA 1.20 1.20";
- String amount="1.00";
- String product="REFRESCO COLA";
- String unitPrice="1.20";
- String total="1.20"
- String lineProduct="1.000' CAÑA DE CERVEZA 0.0 1.20 1.20";
- String amount="1.00";
- String product="CAÑA DE CERVEZA 0.0";
- String unitPrice="1.20";
- String total="1.20"
- String[] split = productLine.split(" ");
- String amount="split[0];
- String product = "";
- for(int i = 0: i < split.length-3; i++){
- if(i > 0 ){ //adding spaces
- product = product + " ";
- }
- product = product + split[i+1];
- }
- String unitPrice=split[split.length-2];
- String total=split[split.length-1]
Add Comment
Please, Sign In to add comment