# `RDF.Sigils`
[🔗](https://github.com/rdf-elixir/rdf-ex/blob/v3.0.0/lib/rdf/sigils.ex#L1)

Sigils for the most common types of RDF nodes.

# `sigil_B`
*macro* 

Handles the sigil `~B` for blank nodes.

It returns an `RDF.BlankNode` from the given string without interpolations
and without escape characters, except for the escaping of the closing sigil
character itself.

## Examples

    iex> import RDF.Sigils
    iex> ~B<foo>
    RDF.bnode("foo")

# `sigil_b`
*macro* 

Handles the sigil `~b` for blank nodes.

It returns an `RDF.BlankNode` from the given string as if it was a double-quoted
string, unescaping characters and replacing interpolations.

## Examples

    iex> import RDF.Sigils
    iex> ~b<foo#{String.downcase("Bar")}>
    RDF.bnode("foobar")

# `sigil_I`
*macro* 

Handles the sigil `~I` for IRIs.

It returns an `RDF.IRI` from the given string without interpolations and
without escape characters, except for the escaping of the closing sigil
character itself.

## Examples

    iex> import RDF.Sigils
    iex> ~I<http://example.com>
    RDF.iri("http://example.com")

# `sigil_i`
*macro* 

Handles the sigil `~i` for IRIs.

It returns an `RDF.IRI` from the given string as if it was a double-quoted
string, replacing interpolations.

Note: Since IRIs don't allow escaped characters that need escaping in Elixir strings
(such as control characters), the only practical difference from `~I` is the
support for interpolation.

## Examples

    iex> import RDF.Sigils
    iex> ~i<http://example.com/#{String.downcase("Foo")}>
    RDF.iri("http://example.com/foo")

# `sigil_L`
*macro* 

Handles the sigil `~L` for plain Literals.

It returns an `RDF.Literal` from the given string without interpolations and without escape characters, except for the escaping of the closing sigil character itself.

The sigil modifier can be used to specify a language tag.

Note: Languages with subtags are not supported.

## Examples

    iex> import RDF.Sigils
    iex> ~L"foo"
    RDF.literal("foo")
    iex> ~L"foo"en
    RDF.literal("foo", language: "en")

# `sigil_l`
*macro* 

Handles the sigil `~l` for blank nodes.

It returns an `RDF.Literal` from the given string as if it was a double-quoted
string, unescaping characters and replacing interpolations.

## Examples

    iex> import RDF.Sigils
    iex> ~l"foo #{String.downcase("Bar")}"
    RDF.literal("foo bar")
    iex> ~l"foo #{String.downcase("Bar")}"en
    RDF.literal("foo bar", language: "en")

---

*Consult [api-reference.md](api-reference.md) for complete listing*
