Class EmulatedStringJoiner

java.lang.Object
org.kigalisim.util.EmulatedStringJoiner

public class EmulatedStringJoiner extends Object
A WebAssembly-compatible string joiner that builds sequences with delimiters.

Provides an alternative to Java's StringJoiner for environments where it is unavailable.

  • Constructor Details

    • EmulatedStringJoiner

      public EmulatedStringJoiner(CharSequence delimiter)
      Constructs a new EmulatedStringJoiner with the specified delimiter.
      Parameters:
      delimiter - The delimiter to be used between joined strings
  • Method Details

    • add

      public EmulatedStringJoiner add(CharSequence newElement)
      Adds a new element to the string sequence.
      Parameters:
      newElement - The element to add
      Returns:
      This EmulatedStringJoiner instance
    • toString

      public String toString()
      Returns the string representation of this joiner.
      Overrides:
      toString in class Object
      Returns:
      The joined string