From 9aab4d7a16fba5dfcf4d60b58a05cc765eca3335 Mon Sep 17 00:00:00 2001 From: Eric Date: Sat, 8 Sep 2012 11:15:49 -0500 Subject: full argument parsing and management capability --- src/rcl_util.erl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/rcl_util.erl') diff --git a/src/rcl_util.erl b/src/rcl_util.erl index c0b5c5d..be20302 100644 --- a/src/rcl_util.erl +++ b/src/rcl_util.erl @@ -21,8 +21,10 @@ %%% @doc Trivial utility file to help handle common tasks -module(rcl_util). --export([mkdir_p/1]). +-export([mkdir_p/1, + indent/1]). +-define(ONE_LEVEL_INDENT, " "). %%============================================================================ %% types %%============================================================================ @@ -41,6 +43,11 @@ mkdir_p(Path) -> DirName = filename:join([filename:absname(Path), "tmp"]), filelib:ensure_dir(DirName). +%% @doc ident to the level specified +-spec indent(non_neg_integer()) -> iolist(). +indent(Amount) when erlang:is_integer(Amount) -> + [?ONE_LEVEL_INDENT || _ <- lists:seq(1, Amount)]. + %%%=================================================================== %%% Test Functions %%%=================================================================== -- cgit v1.2.3