@glitchybyte/dash
    Preparing search index...

    Function separatedString

    • 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"
      

      Parameters

      • str: string

        String to insert separators.

      • every: number

        Count of characters to insert separator in between.

      • separator: string = " "

        Separator string.

      • rightToLeft: boolean = true

        If count should start from right to left or left to right.

      Returns string