~mika/www.m1kadev.nl

ref: 6c5467bac62a698b5e1acabc60976009e7ca837e www.m1kadev.nl/kethel/lib/filex.ex -rw-r--r-- 227 bytes
6c5467ba — m1ka new thoughts :) 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