Platinum Partner

Hide Credit Card Numbers

// hide all digits of a credit card number except the last 4. eg
// cc = "12345678901123456" // hide_card_number(cc) // [ "************3456" ] def hide_card_number(card_number) size = card_number.to_s.size - 1 cc = "" i = 0 0.upto(size) do if( i > size - 4 ) else cc += "*" end i += 1 end cc = cc + card_number[size-3, size].to_s return cc end
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}