init(string:)
Returns a pattern object for the specified pattern string.
Declaration
init(string: String) throwsParameters
- string:
On output, a pointer to an error object that describes why the method failed, or
nilif no error occurred. If you are not interested in the error information, passnilfor this parameter.
Return Value
A pattern object, or nil if the pattern string is invalid and an error will be set.