Re: Number of chars
Re: Number of chars
- Subject: Re: Number of chars
- From: Jean-Daniel Dupas <email@hidden>
- Date: Thu, 21 Mar 2013 10:34:42 +0100
Le 21 mars 2013 à 09:27, Luca Ciciriello <email@hidden> a écrit :
> Hi all.
> I'm using in my iOS project some Objective-C++ modules. Here I have some conversion from NSString to C++11 std::string. After this conversion I found (correctly) in my std::string some 2-byte characters.
> My question is: How can I count the number of chars and not the numbers of byte in my std::string?
>
Don't use std::string to store unicode string. They are not design to support such content.
You can use std::wstring instead.
-- Jean-Daniel
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden