corvus-dotnet / Corvus.Globbing

A zero allocation globbing library
Apache License 2.0
17 stars 1 forks source link

Examples in sample polyglot notebook and README do not work with v 1.0.1 #21

Open Lmooney25 opened 1 year ago

Lmooney25 commented 1 year ago

The examples in the sample notebook and README were written using v 0.1.0.

Some of the examples in the notebook and README pass a ref parameter argument for the tokenizedGlob parameter on the GlobTokenizer.Tokenize method, which is defined as an in parameter.

For example:

public static void TokenizeAGlobExample(string pattern)
{
    Span<GlobToken> tokenizedGlob = stackalloc GlobToken[pattern.Length];
    int tokenCount = Corvus.Globbing.GlobTokenizer.Tokenize(pattern, ref tokenizedGlob);

    Console.WriteLine($"Number of glob tokens created:\t{tokenCount}");
}