~mika/www.m1kadev.nl

ref: 7048a1bc0a10fcff5e44089d3a781dd721554240 www.m1kadev.nl/kethel/lib/filex.ex -rw-r--r-- 227 bytes
7048a1bc — m1ka thought: io errors 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
defmodule FileX do
  @typedoc "Any path"
  @type path() :: binary()

  @spec trimmed_filename(path()) :: binary()
  def trimmed_filename(path) do
    Path.basename(path) |> Path.rootname() |> String.replace("-", "_")
  end
end