On Oct 10, 2006, at 11:07 AM, Alexander Cohen wrote:
On 10-Oct-06, at 11:36 AM, Jonathan Johnson wrote:
On Oct 10, 2006, at 10:22 AM, Alexander Cohen wrote:
Is there a way to get a pointer to Unichar's from a REALstring?
From rb, i create a UTF16 string and pass it into a plugin. From
there, how can i get a UniChar pointer? It seems i can only get a
Char pointer.
Just typecast it. CString() returns the bytes of the string as-is,
so if the encoding is UTF16, it will be UTF16 data.
Ok thats fine, but how about the length? str->Length() seems to
report the actual length of the data and not the length of the
string in its current encoding.
Well, for unichar, just divide it by sizeof( UniChar ).
Otherwise, you could use REALLoadGlobalMethod to load up Len().
HTH,
Jon
--
Jonathan Johnson
[EMAIL PROTECTED]
REAL Software, Inc.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>