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”

 

 

  1. Henüz geridönüş yok.

Yorum yapın

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Değiştir )

Twitter picture

You are commenting using your Twitter account. Log Out / Değiştir )

Facebook photo

You are commenting using your Facebook account. Log Out / Değiştir )

Connecting to %s

Follow

Get every new post delivered to your Inbox.