Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Fabsolute/CouchDB-Custom-UUIDs
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabsolute committed Jun 11, 2018
2 parents 3bf87cf + 082aa2f commit 2cf26ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion priv/default.d/couch_custom_uuids.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ couch_custom_uuid={couch_custom_uuids, start, []}
[custom_uuids]
max_count = 1000
base = 16
length = 6
length = 8
padding_str = 0
padding_length = 2
6 changes: 3 additions & 3 deletions src/couch_custom_uuids_util.erl
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ substring(String, Start, Length) ->
pad_string(String, Length, PadStr) ->
pad_string(String, Length, PadStr, left).
pad_string(String, Length, PadStr, left) ->
string:left(String, Length, PadStr);
string:right(String, Length, PadStr);
pad_string(String, Length, PadStr, right) ->
string:right(String, Length, PadStr).
string:left(String, Length, PadStr).

int_pow(Number, Power) ->
trunc(math:pow(Number, Power)).
trunc(math:pow(Number, Power)).

0 comments on commit 2cf26ac

Please sign in to comment.