I am trying to user MailCore2 (Objective C) in my Swift project.
At the moment I try to retrieve all IMAP Folders from a server (so far that works) and to split the paths by the delimiter.
INBOX.Sent
INBOX.Drafts
to
INBOX
> Sent
> Drafts
The Class MCOIMAPFolder has the property delimiter which is a char. If I try to print this or use it to split the paths:
print("\(folder.delimiter)\n")
var components = folder.path.componentsSeparatedByString(String.init(folder.delimiter))
for component in components {
print("\(component)\n")
}
it will print
46
INBOX.Sent
The closest I could find here was Converting a C char array to a String but this only seems to apply to char[] and not a single char.
So what am I missing?