文字列の処理概要について

6227 ワード

一般的な文字列タイプ:
char wchar_t cstring string 
文字列処理の関数について、具体例:
strcat(str1,str2);
tcslen(str) 
tcsrchr(str, L'\\')  TCHAR
stprintf(TCHAR *buffer,const TCHAR *format [,argument] ..)
tcsdup  copy
tcstok 
tcscpy  .
strcat(), strSource strDestination
MSDN :
 1 char *strcat(
 2    char *strDestination,
 3    const char *strSource 
 4 );
 5 wchar_t *wcscat(
 6    wchar_t *strDestination,
 7    const wchar_t *strSource 
 8 );
 9 unsigned char *_mbscat(
10    unsigned char *strDestination,
11    const unsigned char *strSource 
12 );
13 template 
14 char *strcat(
15    char (&strDestination)[size],
16    const char *strSource 
17 ); // C++ only
18 template 
19 wchar_t *wcscat(
20    wchar_t (&strDestination)[size],
21    const wchar_t *strSource 
22 ); // C++ only
23 template 
24 unsigned char *_mbscat(
25    unsigned char (&strDestination)[size],
26    const unsigned char *strSource 
27 ); // C++ only

 
 
typedef byte BYTE;
typedef unsigned short WORD;
typedef unsigned int UINT;
typedef int INT;
typedef long BOOL;
typedef long LONG;
typedef unsigned long DWORD;
typedef void *HANDLE;
typedef WORD *LPWORD;
typedef DWORD *LPDWORD;
typedef char CHAR;
typedef /* [string] */  __RPC_string CHAR *LPSTR;
typedef /* [string] */  __RPC_string const CHAR *LPCSTR;
typedef wchar_t WCHAR;
typedef WCHAR TCHAR;
typedef /* [string] */  __RPC_string WCHAR *LPWSTR;
typedef /* [string] */  __RPC_string TCHAR *LPTSTR;
typedef /* [string] */  __RPC_string const WCHAR *LPCWSTR;
typedef /* [string] */  __RPC_string const TCHAR *LPCTSTR;
typedef HANDLE *LPHANDLE;

 
例を挙げる
転載先:https://www.cnblogs.com/Uthinker/p/5777165.html