StringMask
struct StringMask
extension StringMask : Equatable
Undocumented
-
Returns a Boolean value indicating whether two values are equal.
Equality is the inverse of inequality. For any values
aandb,a == bimplies thata != bisfalse.Declaration
Swift
static func == (lhs: StringMask, rhs: StringMask) -> BoolParameters
lhsA value to compare.
rhsAnother value to compare.
-
Undocumented
Declaration
Swift
init(mask: String) -
Applies the mask to a given string, and returns the masked string.
Declaration
Swift
func mask(_ text: String) -> StringParameters
textThe string that you want to be masked.
Return Value
The masked string
-
Creates a standard mask for the length. This is a string masked to the given length. (e.g. length: 3, mask: “###” )
Declaration
Swift
static func standardMask(for length: Int) -> StringReturn Value
Mask string (e.g “#####”)
-
Handles the unmasking of a string, given the mask it was initilized with
Declaration
Swift
func unmask(string: String?) -> String?Parameters
stringThe masked string.
Return Value
The unmasked string.
View on GitHub
Install in Dash
StringMask Structure Reference