GlobEx.Sigils (glob_ex v0.1.12)

View Source

This module provides the sigils ~g|| and ~G||.

Summary

Functions

Handles the sigil ~G for globs.

Handles the sigil ~g for globs.

Functions

sigil_G(arg, options)

(macro)

Handles the sigil ~G for globs.

It returns a glob expression pattern without interpolations and without escape characters.

See the module documentation GlobEx for how to write a glob expression.

Examples

iex> ~G|*.txt|
~g|*.txt|

iex> GlobEx.match?(~G|f#{a,b}|, "f#a")
true

sigil_g(term, modifiers)

(macro)

Handles the sigil ~g for globs.

See the module documentation GlobEx for how to write a glob expression.

Examples

iex> ~g|*.txt|
~g|*.txt|

iex> ~g|*.#{"txt"}|
~g|*.txt|

iex> GlobEx.match?(~g|f\#{a,b}|, "f#a")
true