~mika/www.m1kadev.nl

ref: random-links www.m1kadev.nl/kethel/lib/filex.ex -rw-r--r-- 227 bytes
8554f701 — m1ka lmao 3 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