• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to enumerate by code points in Swift beta4?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How to enumerate by code points in Swift beta4?
      • From: Roland King <email@hidden>
  • Prev by Date: Re: input from console window in Xcode
  • Next by Date: Re: How to enumerate by code points in Swift beta4?
  • Previous by thread: Re: input from console window in Xcode
  • Next by thread: Re: How to enumerate by code points in Swift beta4?
  • Index(es):
    • Date
    • Thread