Packages

A customizable library for printing tables with colors and styles in Gleam.

Current section

Files

Jump to
gtabler src gtabler@style.erl
Raw

src/gtabler@style.erl

-module(gtabler@style).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([bold/1, underline/1, reversed/1, dim/1, italic/1]).
-file("C:\\Users\\erick\\Documents\\projects\\gtabler\\src\\gtabler\\style.gleam", 3).
-spec bold(binary()) -> binary().
bold(Text) ->
<<<<"\x{001b}[1m"/utf8, Text/binary>>/binary, "\x{001b}[0m"/utf8>>.
-file("C:\\Users\\erick\\Documents\\projects\\gtabler\\src\\gtabler\\style.gleam", 7).
-spec underline(binary()) -> binary().
underline(Text) ->
<<<<"\x{001b}[4m"/utf8, Text/binary>>/binary, "\x{001b}[0m"/utf8>>.
-file("C:\\Users\\erick\\Documents\\projects\\gtabler\\src\\gtabler\\style.gleam", 11).
-spec reversed(binary()) -> binary().
reversed(Text) ->
<<<<"\x{001b}[7m"/utf8, Text/binary>>/binary, "\x{001b}[0m"/utf8>>.
-file("C:\\Users\\erick\\Documents\\projects\\gtabler\\src\\gtabler\\style.gleam", 15).
-spec dim(binary()) -> binary().
dim(Text) ->
<<<<"\x{001b}[2m"/utf8, Text/binary>>/binary, "\x{001b}[0m"/utf8>>.
-file("C:\\Users\\erick\\Documents\\projects\\gtabler\\src\\gtabler\\style.gleam", 19).
-spec italic(binary()) -> binary().
italic(Text) ->
<<<<"\x{001b}[3m"/utf8, Text/binary>>/binary, "\x{001b}[0m"/utf8>>.