[swift-users] CharacterSet vs Set<Character>

Jean-Denis Muys jdmuys at gmail.com
Mon Oct 3 07:17:19 CDT 2016


You are right: I don’t know much about asian languages.

How would you go about counting consonants, vowels (and tone-marks?) in the most general way?

I think I would need to educate myself about those things. Any pointer welcome.

JD


> On 3 Oct 2016, at 12:52, Gerriet M. Denkmann <g at mdenkmann.de> wrote:
> 
> 
>> On 3 Oct 2016, at 16:28, Jean-Denis Muys via swift-users <swift-users at swift.org> wrote:
>> 
>> ASCII? Probably not. Latin? perhaps, though not obvious. For example French accented letters would probably have to be handled somehow. Greek or Cyrillic? Perhaps. Other scripts? Unlikely, but what do I know.
> 
> Don’t be so Europe-centric. Other people have vowels too.
> Thai for example. And here are Swift characters completely useless: กี้ is one character (for Swift) but it is really one consonant + one vowel + one tone-mark.
> So you will have to use unicodeScalars.
> 
> Have fun!
> 
> Gerriet.
> 



More information about the swift-users mailing list