Marmos
v juptune
v asn1
v lang
v ast
v Classes
v Enums
v ir
v parser
v Enums
v Structs
v core
v crypto
v keyexchange
v memory
v data
v alphabet
v buffer
v json
v builder
v parser
v Enums
v Structs
v serialise
v Structs
v Templates
v pem
v Enums
v Structs

Structs AsciiAlphabet

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module 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;
}

Documentation

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!

Params

Functions

Name Description
isAllowed
next

Variables

Name Description
AllowedChars

Forwarded template parameter.

_flags