Skip to content
FutureBlitz

    Install

    Import std.text.glob

    std.text.glob

    std.text.glob: a shell's wildcards, matched against all of a String, a character at a time. * is any run of characters but /, and ** any run at all, so "src//*.fb" reaches into folders, and "/", as a whole folder, can be no folder, as in bash's globstar; ? is one character but /; [abc] and [a-z] are one of a set, and [!abc] or [^abc] one that isn't, never /; {a,b} is either; and \ makes the character after it itself. A [ or { without its end is itself.

    std/text/glob.fb

    Types

    Glob class

    Public Class Glob

    A pattern, read once, which Matches tells text against.

    std/text/glob.fb, line 28

    • Public ReadOnly Field Pattern: String field #

      The pattern, as it was given.

    • Public ReadOnly Field IgnoreCase: Bool field #

      Whether letters match in either case.

    • Public New(pattern: String, ignoreCase: Bool = False) constructor #

      A Glob of pattern. With ignoreCase, letters match in either case, as Unicode folds each one, so the pattern matches all it does without it, and more.

    • Public Method Matches(text: String): Bool method #

      Whether all of text matches the pattern.

    • Public Static Method Match(pattern: String, text: String, ignoreCase: Bool = False): Bool static method #

      Whether all of text matches pattern, as Glob(pattern, ignoreCase).Matches(text) tells.

    Report an issue with this page or with FutureBlitz on GitHub.