Contents

getObjectValue(_:for:errorDescription:)

Returns by reference a person name components object after creating it from a given string.

Declaration

func getObjectValue(_ obj: AutoreleasingUnsafeMutablePointer<AnyObject?>?, for string: String, errorDescription error: AutoreleasingUnsafeMutablePointer<NSString?>?) -> Bool

Parameters

  • obj:

    On return, contains an instance of Nspersonnamecomponents, or nil if conversion failed.

  • string:

    A string that is parsed to create a person name components object.

  • error:

    If an error occurs, upon return contains an Nserror object in the Nscocoaerrordomain with code Nsformattingerror Swift.var that explains why the conversion failed. If you pass in nil for error, you are indicating that you are not interested in error information.

Return Value

true if conversion succeeded; otherwise false.

See Also

Converting Between Person Name Components and Strings