Using Substring function in CString() class C++
If we want to use the typical C# string functionality in C++ or C we use basic CString() class. It implements many methods such as GetBuffer(); GetLength(); Append() CloneData(), Concatenate(),Find() , Format() , GetString() ,Insert() ,MakeUpper() , MakeLower(), Span() , Trim() , TrimRight() , TrimLeft()…
It has the Substring() C# method inCString. Mid(int,int) function. the Mid() function gets the begin index and length of the substring we want to use from the original string. It has the same functionality as SubString() in C#.
some example:
CString deger;
deger=”osman mumcu”;
CString yenideger=deger.Mid(6,5);
/////yenideger ->is ”mumcu”
Henüz geridönüş yok.