# `Beaver.MLIR.StringRef`

This module defines functions working with MLIR StringRef.

call `Kernel.to_string/1` on a `StringRef` to get its content as Elixir bitstring.

# `t`

```elixir
@type t() :: %Beaver.MLIR.StringRef{ref: term()}
```

# `create`

Create a Elixir owned null-terminated C string from a Elixir bitstring and create a `StringRef` from it.

> #### Not really a reference {: .info}
>
> A `StringRef` created in Elixir is not a reference to the BEAM binary as argument. Instead, a copy is made. In other words, excessively creating `StringRef` using this function can lead to memory leak.

# `data`

Get the data of the StringRef as an array pointer of unsigned 8-bit integers.

# `length`

Get the length of the StringRef as Erlang integer.

# `make`

