Packages

A micro web framework for Gleam

Current section

Files

Jump to
bliss src bliss@utils.erl
Raw

src/bliss@utils.erl

-module(bliss@utils).
-compile(no_auto_import).
-export([segments/1]).
-spec drop_empty_segments(list(binary())) -> list(binary()).
drop_empty_segments(Segments) ->
gleam@list:filter(Segments, fun(Seg) -> not gleam@string:is_empty(Seg) end).
-spec segments(binary()) -> list(binary()).
segments(Path) ->
_pipe = gleam@string:split(Path, <<"/"/utf8>>),
drop_empty_segments(_pipe).