Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Everything / convert

Convert

convert

Great Reads

by Mario Ghecea
This article describes the technique I used to ingest large text files to create an e-book publishing platform on the Android Market
by shijo joseph
An extension methods library which could do the equality comparison operations easily
by Xavier Junqué i de Fortuny
Generalized continued fractions are transformed into simple continued fractions (SCF) and basic operations (-, +, *, /) can be done.
by NightWizzard
Convert amounts to their spoken equivalents

Latest Articles

by Mario Ghecea
This article describes the technique I used to ingest large text files to create an e-book publishing platform on the Android Market
by shijo joseph
An extension methods library which could do the equality comparison operations easily
by Xavier Junqué i de Fortuny
Generalized continued fractions are transformed into simple continued fractions (SCF) and basic operations (-, +, *, /) can be done.
by NightWizzard
Convert amounts to their spoken equivalents

All Articles

Sort by Score

convert 

by Xavier Junqué i de Fortuny
Generalized continued fractions are transformed into simple continued fractions (SCF) and basic operations (-, +, *, /) can be done.
by NightWizzard
Convert amounts to their spoken equivalents
by Ritesh_Singh
A function which returns date in different formats base on the input given
by CalicoSkies
C++: Converting an MFC CString to a std::string
by jean Davy
As you use CString, you have access to the CW2A ATL macro, assuming that you work with _UNICODE defined, here it is:CString theCStr;...std::string STDStr( CW2A( theCStr.GetString() ) );which will convert to "system encoding on the user's machine" (thanks Nemanja[^] comment !), if you...
by oleg63
CString m_Name;CT2CA pszName(m_Name);std::string m_NameStd(pszName);Works for me everywhere... :)
by steveb
In UNICODE:CString str = L"Test";std::wstring ws(str);std::string s;s.assign(ws.begin(), ws.end());
by Kaqkk79
How about this (assuming your project is set to Unicode)?CString strMyString=L"Test string";std::string strMyStdAnsiStr = CStringA(strMyString);
by geoyar
I am using CString str(_T("Test"));typedef std::basic_string string_t;string_t resStr(str);It works because the CSting has a cast to LPTCSTR.
by stonexin
LPSTR WideChar2MBCS( const CString& strCS ){ const UINT wLen = strCS.GetLength() + 1; UINT aLen = WideCharToMultiByte(CP_ACP,0,strCS,wLen,NULL,0,NULL,NULL); LPSTR lpa = new char[aLen]; WideCharToMultiByte(CP_ACP,0,strCS,wLen,lpa,aLen,NULL,NULL); return...
by Sriranganatha
Discussion on which casting to use - static, dynamic or reinterpret
by Cinchoo
Quick tutorial on converting CSV file to JSON file using Cinchoo ETL
by Frans Jan
This article shows how to save a Windows Form to a PDF file.
by Patrick Harris
Class for converting decimals and fractions (allows rounding to a decimal also)
by ♥…ЯҠ…♥
Convert PDF content into text using C#, for beginners.
by Jfer
I share this 'cause i don't find it in web. Uses Convertall to change data type between arrays
by Sayed Irfanul Hasan
Text to PDF Convert
by Mikhail-T
Tutorial on how to create simple extension that converts view model propety name to string
by Xavier John
Converter to convert OHLC data to a larger timeframe
by WajihUllahBaig
Hi there,Its been a while since I wrote my last article. Since got myself into a problem of getting the system name of my PC.I dragged my C instincts into the MSDN world of asking how to get the PC name.After fiddling for a while I got hold of the PC name, not that difficult as a...
by Alain Rist
You might have considered using ::GetComputerNameA() which does the conversion for you:std::string GetSystemName(){ CHAR sBuf[MAX_COMPUTERNAME_LENGTH + 1] = {0}; DWORD dwLen = MAX_COMPUTERNAME_LENGTH; ::GetComputerNameA(sBuf, &dwLen); return std::string(sBuf);}Note...
by Amit Singh Baghel
A useful tip to export a Div to PDF (with Unicode support) with the help of NReco-PDF Generator for .NET (C#), JQuery and Handler in ASP.NET
by T-C
Use an extension method that applies to any object to Cast to other types
by Viktor Kovács
A simple solution for processing spaceless strings
by Alireza C
I want to show how we can export data from data table to Excel simply.
by blitzkrieged
This is a demonstration of splicing an animated GIF (or any image) frame by frame without having to write to the disc.
by Xavier Junqué i de Fortuny
Converts MathML coded string to/from plain text string
by madagaga
Converting MSSQL database to MySQL
by Kornfeld Eliyahu Peter
Convert numbers of any base to base10...
by Morgan Estes
Compress and encode a string to save loading time in the browser
by rohitsies
CSV file generator using simplistic approach
by Tieske8
Fast conversion between strings and byte arrays, while bypassing the codepage limitations
by jocko3d
The TestConversion function is not valid. The line of code "data = data & Chr(n)" uses the Chr function to build a string of characters used for the test. The problem is that the Chr function is itself bound to a code page. Specifically, it will utilize the code page that is in use by the...