subchannelOf static method

String subchannelOf(
  1. String masked
)

The channel an added/removed line travelled on.

The one place a masked string is taken apart, and it is safe because mask built it: the channel is everything before the first space, and a channel name never contains one.

Implementation

static String subchannelOf(String masked) {
  var space = masked.indexOf(' ');
  return space < 0 ? masked : masked.substring(0, space);
}