parseNumeric

Parser for RPL_ENDOFWHOIS

Format is 318 <client> <nick> :End of /WHOIS list

Examples

import virc.common : User;
import std.range : only, takeNone;
{
	auto reply = parseNumeric!(Numeric.RPL_ENDOFWHOIS)(only("someone", "whoisuser", "End of /WHOIS list"));
	assert(reply.get.user == User("whoisuser"));
}
{
	immutable reply = parseNumeric!(Numeric.RPL_ENDOFWHOIS)(only("someone", "whoisuser"));
	assert(reply.isNull);
}
{
	immutable reply = parseNumeric!(Numeric.RPL_ENDOFWHOIS)(only("someone"));
	assert(reply.isNull);
}
{
	immutable reply = parseNumeric!(Numeric.RPL_ENDOFWHOIS)(takeNone(only("")));
	assert(reply.isNull);
}

Meta