Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Reliably converting between std::vector<uint8_t> and WString (I would like to use other libraries which leverage std::vector etc and would like to know how to convert)
Re: Reliably converting between std::vector<uint8_t> and WString [message #55561 is a reply to message #55560] Sun, 22 November 2020 00:26 Go to previous message
Oblivion is currently offline  Oblivion
Messages: 1094
Registered: August 2007
Senior Contributor
Quote:
How do I reliably take the raw buffer of a WString and convert it to a std::vector<uint8_t>?



Both Upp::WString and Upp::String classes have a ToStd() method and relevant constructors which converts them to std::string or from std::string to them, if that's what you need.

If you simply need Utf16 to Utf8 conversion, there is also a ToUtf8 method that takes a WString and converts it to Utf8.

Best regards,
Oblivion


[Updated on: Sun, 22 November 2020 00:32]

Report message to a moderator

 
Read Message
Read Message
Previous Topic: How to Mask Input fields
Next Topic: The Mysterious checkbox
Goto Forum:
  


Current Time: Sat May 11 20:49:39 CEST 2024

Total time taken to generate the page: 0.02163 seconds