Brompton cable & housing replacement
The Brompton uses standard gear/shifter cables and brake cables. Flat bar brake levers use the same cable head as a mountain bike (i.e. barrel, not pear).
The handlebar selection could make a small difference to the actual length you need, but if you are able to remove the existing outer casing and take it to a bike shop (or measure it) you can have the new casing cut to length by the shop, saving you a job and saving wastage.
Gear outer casing is 4mm diameter, the inner wire is 1.2mm or 1.1mm(SRAM).
Brake outer casing is 5mm diameter.
Good quality stainless steel cables are not expensive, perhaps £2.50 each and the outer casing is generally £2.50/metre.