CFURLCreateWithString(_:_:_:)
Creates a CFURL object using a given CFString object.
Declaration
func CFURLCreateWithString(_ allocator: CFAllocator!, _ URLString: CFString!, _ baseURL: CFURL!) -> CFURL!Parameters
- allocator:
The allocator to use to allocate memory for the new
CFURLobject. PassNULLor Kcfallocatordefault to use the current default allocator. - URLString:
The
CFStringobject containing the URL string. - baseURL:
The URL to which
URLStringis relative. PassNULLifURLStringcontains an absolute URL or if you want to create a relative URL. IfURLStringcontains an absolute URL,baseURLis ignored.
Return Value
A new CFURL object. Ownership follows the create rule. See The Create Rule.
Discussion
Any escape sequences in URLString will be interpreted using UTF-8.
See Also
Creating a CFURL
CFURLCopyAbsoluteURL(_:)CFURLCreateAbsoluteURLWithBytes(_:_:_:_:_:_:)CFURLCreateByResolvingBookmarkData(_:_:_:_:_:_:_:)CFURLCreateCopyAppendingPathComponent(_:_:_:_:)CFURLCreateCopyAppendingPathExtension(_:_:_:)CFURLCreateCopyDeletingLastPathComponent(_:_:)CFURLCreateCopyDeletingPathExtension(_:_:)CFURLCreateFilePathURL(_:_:_:)CFURLCreateFileReferenceURL(_:_:_:)CFURLCreateFromFileSystemRepresentation(_:_:_:_:)CFURLCreateFromFileSystemRepresentationRelativeToBase(_:_:_:_:_:)CFURLCreateFromFSRef(_:_:)CFURLCreateWithBytes(_:_:_:_:_:)CFURLCreateWithFileSystemPath(_:_:_:_:)CFURLCreateWithFileSystemPathRelativeToBase(_:_:_:_:_:)