public static Set<String> parseChannelsFromString(String channels,boolean prepend){
  String[] parts=channels.split(",");
  Set<String> result=new LinkedHashSet<>();
  for (  String part : parts) {
    String channel=part.trim();
    if (validateChannel(channel)) {
      if (prepend && !channel.startsWith("#")) {
        channel="#" + channel;
      }
      result.add(StringUtil.toLowerCase(channel));
    }
  }
  return result;
}

public static Set < String > parseChannelsFromString ( String channels , boolean prepend ) { String [ ] parts = channels . split ( "," ) ; Set < String > result = new LinkedHashSet < > ( ) ; for ( String part : parts ) { String channel = part . trim ( ) ; if ( validateChannel ( channel ) ) { if ( prepend && ! channel . startsWith ( "#" ) ) { channel = "#" + channel ; } result . add ( StringUtil . toLowerCase ( channel ) ) ; } } return result ; }
parses comma - separated channels from a string .
