Convenience function to separate groups of characters and insert a separator string between them.
For example, to separate nibbles or bytes on a binary string, or bytes on a hex string.
const binStr = separatedString("10011001", 4) // "1001 1001" Copy
const binStr = separatedString("10011001", 4) // "1001 1001"
String to insert separators.
Count of characters to insert separator in between.
Separator string.
If count should start from right to left or left to right.
Convenience function to separate groups of characters and insert a separator string between them.
For example, to separate nibbles or bytes on a binary string, or bytes on a hex string.