How to enumerate by code points in Swift beta4?
How to enumerate by code points in Swift beta4?
- Subject: How to enumerate by code points in Swift beta4?
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Wed, 23 Jul 2014 12:43:22 +0700
I seem to remember that beta 3 did enumerate by Unicode code points.
But beta 4 now enumerates by graphem clusters (a.k.a composed characters sequences):
let ss = "ท่ี"
println("string \"\(ss)\" enumerated:")
for (i,s) in enumerate(ss) { println("char[\(i)] = \(s)") }
prints:
string "ท่ี" enumerated:
char[0] = ท่ี
How can I get the Unicode code points (NOT unsigned shorts in utf-16 representation) as UInts (or Ints) ?
like: 0xe17, 0xe35, 0xe48.
Gerriet.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden