Is there a way in java 8(or lower) that formats a single string putting the character ':' between each 2 characters? The simpler, the best.
Example (or something similar to this):
String a = "000000";
string b = someMethodThatIdontKnow(a, 2, ':'); // b -> 00:00:00
Ps: I know how to do this using split method or StringBuilder, but I want a cleaner way to do the work.
Pss: Consider that the input string is ever going to have length 6