1234567891011121314151617181920module juptune.data.alphabet;
struct AsciiAlphabet(
string AllowedChars_
)
{
/++ FUNCTIONS ++/
///
bool isAllowed(char ch);
///
char next(const char[] str, size_t cursor);
/++ VARIABLES ++/
/// Forwarded template parameter.
static immutable auto AllowedChars;
///
static immutable auto _flags;
}
A simple alphabet provider that only allows a specific set of statically known ascii characters.
One tiny benefit of using a compile-time dataset is that isAllowedcan actually get constant folded... though you'd almost never use it on compile-time only data, but it's still cool!
| Name | Description |
|---|---|
| isAllowed | |
| next |
| Name | Description |
|---|---|
| AllowedChars |
Forwarded template parameter. |
| _flags |