Table of Contents

Method IsWritable

Namespace
MailFathom.Domain.Mutations
Assembly
MailFathom.Domain.dll

IsWritable(string?)

Reports whether a keyword is one MailFathom may ask a server to store.

public static bool IsWritable(string? keyword)

Parameters

keyword string

The keyword as somebody wrote it.

Returns

bool

true when a STORE may name it.

Remarks

The bounds Normalized(string?) already applies are applied through it rather than restated, so how long a keyword may be is one answer in one place. What this adds is the atom grammar, whose excluded characters are the atom specials ( ) { % * " \ ], the space, every control character, and everything above US-ASCII that the grammar's CHAR does not reach.

The grammar is judged against the written form rather than the folded one, because the written form is what a STORE sends. Invariant upper-casing maps a few characters into US-ASCII from outside it — ſ becomes S — so reading the grammar off the folded form would accept a keyword that reaches the server as bytes an atom cannot hold.