Re: String conversion
Lauri Nurmi <[email protected]> Tue, 7 Jul 2026 20:33:00 +0300
| Newsgroups | gmane.comp.lib.wxwindows.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --------------83z8hcU9HPwt1Wx8qfoZKJbd Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable From a quick glance, simdutf doesn't provide API that takes=20 NSMutableString or wxString, so you'd still need to know how to convert=20 from NSMutableString to /something/, and from /something/ to wxString,=20 right? Also sounds pretty overkill to adopt a whole new library just to achieve=20 something that could be a simple as: wxString mywx =3D wxString::FromUTF8([myMutableStr UTF8String]); Is it this simple, then? I didn't try, just made a guess by reading the=20 docs. Sean Tolstoyevski kirjoitti 7.7.2026 klo 20:04: > if possible third party libs for your environment, you can use simdutf=20 > for all string conversions. > also c++ has conversion templates but deprecated. see: codectv . > > simdutf is robust lib. > >> On 7 Jul 2026, at 18:11, [email protected] wrote: >> >> =EF=BB=BF >> >> Hi, >> >> I=E2=80=99m having to write a function in Objective-C, which I=E2=80=99m= not really=20 >> familiar with. >> >> What is the best way to convert from NSMutableString* to wxString,=20 >> please? >> >> Very best wishes. >> >> Tim >> >> --=20 >> Please read https://www.wxwidgets.org/support/mlhowto.htm before posting= . >> --- >> You received this message because you are subscribed to the Google=20 >> Groups "wx-users" group. >> To unsubscribe from this group and stop receiving emails from it,=20 >> send an email to [email protected]. >> To view this discussion visit=20 >> https://groups.google.com/d/msgid/wx-users/009a01dd0e22%24ef8b1790%24cea= 146b0%24%40raisedbar.net=20 >> <https://groups.google.com/d/msgid/wx-users/009a01dd0e22%24ef8b1790%24ce= a146b0%24%40raisedbar.net?utm_medium=3Demail&utm_source=3Dfooter>. > --=20 > Please read https://www.wxwidgets.org/support/mlhowto.htm before posting. > --- > You received this message because you are subscribed to the Google=20 > Groups "wx-users" group. > To unsubscribe from this group and stop receiving emails from it, send=20 > an email to [email protected]. > To view this discussion visit=20 > https://groups.google.com/d/msgid/wx-users/08A21085-8CF1-46BC-B828-6CCF26= 0A64B1%40gmail.com=20 > <https://groups.google.com/d/msgid/wx-users/08A21085-8CF1-46BC-B828-6CCF2= 60A64B1%40gmail.com?utm_medium=3Demail&utm_source=3Dfooter>. --=20 Please read https://www.wxwidgets.org/support/mlhowto.htm before posting. ---=20 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 e= mail to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/wx-users/a3= c54665-ab6d-4f62-abdf-2c686a25a462%40iki.fi. --------------83z8hcU9HPwt1Wx8qfoZKJbd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <!DOCTYPE html> <html> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF-8= "> </head> <body> <div class=3D"moz-cite-prefix">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 <i>something</i>, and from <i>something</i> to wxString, right?</div> <div class=3D"moz-cite-prefix"><br> </div> <div class=3D"moz-cite-prefix">Also sounds pretty overkill to adopt a whole new library just to achieve something that could be a simple as:</div> <pre class=3D"moz-cite-prefix">wxString mywx =3D wxString::FromUTF8([my= MutableStr UTF8String]);</pre> <div class=3D"moz-cite-prefix">Is it this simple, then? I didn't try, just made a guess by reading the docs.</div> <div class=3D"moz-cite-prefix"><br> </div> <br> <div class=3D"moz-cite-prefix">Sean Tolstoyevski kirjoitti 7.7.2026 klo 20:04:<br> </div> <blockquote type=3D"cite" cite=3D"mid:[email protected]"> <meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF= -8"> <div dir=3D"ltr">if possible third party libs for your environment, you can use simdutf for all string conversions.=C2=A0</div> <div dir=3D"ltr">also c++ has conversion templates but deprecated. see: codectv .=C2=A0</div> <div dir=3D"ltr"><br> </div> <div dir=3D"ltr">simdutf is robust lib.=C2=A0</div> <div dir=3D"ltr"><br> <blockquote type=3D"cite">On 7 Jul 2026, at 18:11, <a class=3D"moz-txt-link-abbreviated" href=3D"mailto:tim@raisedba= r.net">[email protected]</a> wrote:<br> <br> </blockquote> </div> <blockquote type=3D"cite"> <div dir=3D"ltr">=EF=BB=BF <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF-8"> <meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)"> <style>@font-face { font-family: "Cambria Math"; }@font-face { fo= nt-family: Calibri; }p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 0cm= ; font-size: 11pt; font-family: Calibri, sans-serif; }span.EmailStyle17 { f= ont-family: Calibri, sans-serif; color: windowtext; }.MsoChpDefault { font-= size: 11pt; }div.WordSection1 { page: WordSection1; }</style> <div class=3D"WordSection1"> <p class=3D"MsoNormal">Hi,<o:p></o:p></p> <p class=3D"MsoNormal"><o:p>=C2=A0</o:p></p> <p class=3D"MsoNormal">I=E2=80=99m having to write a function i= n Objective-C, which I=E2=80=99m not really familiar with.<o:p>= </o:p></p> <p class=3D"MsoNormal"><o:p>=C2=A0</o:p></p> <p class=3D"MsoNormal">What is the best way to convert from NSMutableString* to wxString, please?<o:p></o:p></p> <p class=3D"MsoNormal"><o:p>=C2=A0</o:p></p> <p class=3D"MsoNormal">Very best wishes.<o:p></o:p></p> <p class=3D"MsoNormal"><o:p>=C2=A0</o:p></p> <p class=3D"MsoNormal">Tim<o:p></o:p></p> <p class=3D"MsoNormal"><o:p>=C2=A0</o:p></p> </div> -- <br> Please read <a href=3D"https://www.wxwidgets.org/support/mlhowto.htm" moz-do-not-send=3D"true" class=3D"moz-txt-link-freetext">https:= //www.wxwidgets.org/support/mlhowto.htm</a> before posting.<br> --- <br> You received this message because you are subscribed to the Google Groups "wx-users" group.<br> To unsubscribe from this group and stop receiving emails from it, send an email to <a href=3D"mailto:[email protected]" moz-do-not-send=3D"true" class=3D"moz-txt-link-freetext">wx-use= [email protected]</a>.<br> To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/wx-users/009a01dd0e22%24ef8b1790%= 24cea146b0%24%40raisedbar.net?utm_medium=3Demail&utm_source=3Dfooter" moz-do-not-send=3D"true">https://groups.google.com/d/msgid/wx-u= sers/009a01dd0e22%24ef8b1790%24cea146b0%24%40raisedbar.net</a>.<br> </div> </blockquote> -- <br> Please read <a href=3D"https://www.wxwidgets.org/support/mlhowto.htm" moz-do-not-send=3D"true" class=3D"moz-txt-link-freetext">https://ww= w.wxwidgets.org/support/mlhowto.htm</a> before posting.<br> --- <br> You received this message because you are subscribed to the Google Groups "wx-users" group.<br> To unsubscribe from this group and stop receiving emails from it, send an email to <a href=3D"mailto:[email protected]" moz-do-not-send=3D"true" class=3D"moz-txt-link-freetext">wx-users+u= [email protected]</a>.<br> To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/wx-users/08A21085-8CF1-46BC-B828-= 6CCF260A64B1%40gmail.com?utm_medium=3Demail&utm_source=3Dfooter" moz-do-not-send=3D"true">https://groups.google.com/d/msgid/wx-users= /08A21085-8CF1-46BC-B828-6CCF260A64B1%40gmail.com</a>.<br> </blockquote> <p><br> </p> </body> </html> <p></p> -- <br /> Please read <a href=3D"https://www.wxwidgets.org/support/mlhowto.htm">https= ://www.wxwidgets.org/support/mlhowto.htm</a> before posting.<br /> --- <br /> You received this message because you are subscribed to the Google Groups &= quot;wx-users" group.<br /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]">wx-users+u= [email protected]</a>.<br /> To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/= wx-users/a3c54665-ab6d-4f62-abdf-2c686a25a462%40iki.fi?utm_medium=3Demail&u= tm_source=3Dfooter">https://groups.google.com/d/msgid/wx-users/a3c54665-ab6= d-4f62-abdf-2c686a25a462%40iki.fi</a>.<br /> --------------83z8hcU9HPwt1Wx8qfoZKJbd--