(all s)
Obscure the whole string. Useful for passwords
Example:
(dc.string/all "1234567890") ;;=> "**********"
Obscure the whole string. Useful for passwords Example: ```clojure (dc.string/all "1234567890") ;;=> "**********" ```
(email s)
Obscure an email. Examples:
Obscure an email. Examples: - some.email@gmail.com -> so******il@gmail.com - small@gmail.com -> s****@gmail.com - bob@gmail.com -> b**@gmail.com
(offset s opts)
Given a string, obscure all the string content from start
+start-offset
to end
-end-offset
>
opts:
:start
: amount of chars at the beginning of the string to not be obscured:end
: amount of chars at the end of the string to not be obscured(dc.string/offset "1234567890" {:start 3 :end 4}) ;;=> "123***4890")
Given a string, obscure all the string content from `start`+`start-offset` to `end`-`end-offset`> opts: - `:start`: amount of chars at the beginning of the string to not be obscured - `:end`: amount of chars at the end of the string to not be obscured ```clojure (dc.string/offset "1234567890" {:start 3 :end 4}) ;;=> "123***4890") ```
(phone s)
Obscure a phone number. It removes phone number's specific special characters
such as ()+
and white spaces
Examples:
Obscure a phone number. It removes phone number's specific special characters such as `()+` and white spaces Examples: - +55 (11) 91234-1234 -> 55119****1234 - (11) 91234-1234 -> 119****1234 - 91234-1234 -> *****1234
(symmetric-offset s n)
Same as offset
but :start
and :end
are equal
Same as `offset` but `:start` and `:end` are equal
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close