Is there a type with bigger capacity than u_long or UInt64 in Swift?
I have a function that takes very big integers to identify a credit card numbe
A credit card number is not a number in a meaningful mathematical sense. It is a sequence of digits and a CC should be treated as text, much like a phone number. One immediate issue of using a fixed-length integer value is that code cannot simultaneously detect leading and trailing zeros from "no more numbers present".
Use a string or a specific (custom) type representing the CC number, probably using a string internally. The length of the number (in base-10) is then trivially the number of digits: which is the length of the underlying string.
The CC number (represented by a bonafide string) can later be encoded into an appropriate binary representation, if (and when) required.