Contents

init(string:)

Returns a pattern object for the specified pattern string.

Declaration

init(string: String) throws

Parameters

  • string:

    On output, a pointer to an error object that describes why the method failed, or nil if no error occurred. If you are not interested in the error information, pass nil for this parameter.

Return Value

A pattern object, or nil if the pattern string is invalid and an error will be set.