Current section
Files
Jump to
Current section
Files
src/glentities.erl
-module(glentities).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([decode/1, encode/2]).
-export_type([encode_mode/0]).
-type encode_mode() :: named | hex | html_body.
-spec decode(binary()) -> binary().
decode(Text) ->
glentities@decoder:decode(Text).
-spec encode(binary(), encode_mode()) -> binary().
encode(Text, Mode) ->
case Mode of
named ->
glentities@named_encoder:encode(Text);
hex ->
glentities@hex_encoder:encode(Text);
html_body ->
glentities@html_encoder:encode(Text)
end.