Localization : Is CString::Left() function safe?

If I am writing a UNICODE app, is it safe to use the CString Left() function (i.e. CString s = x.Left(5) where x is also a CString with a value in it?

Or do I need to do something like: s = x.Left(5 * sizeof(TCHAR))

Thanks.
LVL 1
rascalAsked:
Who is Participating?
 
mnewton022700Connect With a Mentor Commented:
It is definitely safe. I've worked with CString under UNICODE for quite some time and have never had any problems.

Left extracts the given number of characters whether they be TCHARs or simply chars.

0
 
Pyr0Commented:
I used the Left function and it did not extract anything... it returned the entire word!! ?????
0
All Courses

From novice to tech pro — start learning today.