String conversion

18 views
Skip to first unread message

t...@raisedbar.net

unread,
Jul 7, 2026, 11:11:56 AMJul 7
to wx-u...@googlegroups.com

Hi,

 

I’m having to write a function in Objective-C, which I’m not really familiar with.

 

What is the best way to convert from NSMutableString* to wxString, please?

 

Very best wishes.

 

Tim

 

Sean Tolstoyevski

unread,
Jul 7, 2026, 1:04:39 PMJul 7
to wx-u...@googlegroups.com
if possible third party libs for your environment, you can use simdutf for all string conversions. 
also c++ has conversion templates but deprecated. see: codectv . 

simdutf is robust lib. 

On 7 Jul 2026, at 18:11, t...@raisedbar.net wrote:


--
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
---
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wx-users+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/wx-users/009a01dd0e22%24ef8b1790%24cea146b0%24%40raisedbar.net.

Lauri Nurmi

unread,
Jul 7, 2026, 1:33:07 PMJul 7
to wx-u...@googlegroups.com
From a quick glance, simdutf doesn't provide API that takes NSMutableString or wxString, so you'd still need to know how to convert from NSMutableString to something, and from something to wxString, right?

Also sounds pretty overkill to adopt a whole new library just to achieve something that could be a simple as:
wxString mywx = wxString::FromUTF8([myMutableStr UTF8String]);
Is it this simple, then? I didn't try, just made a guess by reading the docs.
Reply all
Reply to author
Forward
0 new messages