parse static method

List<String> parse(
  1. String input
)

Implementation

static List<String> parse(String input) {
  if (input[input.length - 1] != TextMessageFormat.recordSeparator) {
    throw new Exception("Message is incomplete.");
  }

  var messages = input.split(TextMessageFormat.recordSeparator);

  messages.removeLast();
  return messages;
}