반응형
  • 기본적인 문자열 관련 함수
함수 설명   _MBCS(멀티바이트)
(_UNICODE 정의안됨)
 _UNICODE(유니코드) 정의됨  TCHAR 통합형(권장)
문자열 복사  strcpy_s wcscpy_s _tcscpy_s
문자열 복사
(길이 지정)
strncpy_s _mbsnbcpy_s  _tcsncpy_s
문자열 서식  sprintf_s
sprintf
swprintf_s
swprintf
 _stprintf_s
_stprintf
문자열 비교 strcmp wcscmp  _tcscmp
 문자열 길이 strlen wcslen  _tcslen
 문자열 추가  strcat_s
strcat
wcscat_s
wcscat
_tcscat_s
_tcscat
문자 검색 strchr wcschr _tcschr
문자열 검색 strstr wcsstr _tcsstr
 문자열 스트림 입력 scanf_s wscanf_s _tscanf_s

 

  • 문자열을 정수 또는 실수형으로 변환
 함수 설명    _MBCS(멀티바이트) 
(_UNICODE 정의안됨)
  _UNICODE(유니코드) 정의됨   TCHAR 통합형(권장)
 문자열 정수(int) 변환  atoi _wtoi _ttoi
 문자열 정수(long) 변환  atol  _wtol  _ttol
 문자열 정수(long long) 변환  atoll  _wtoll  _ttoll
 문자열 실수(double) 변환 atof  _wtof _ttof

 

  • 파일입출력 관련
 함수 설명    _MBCS(멀티바이트) 
(_UNICODE 정의안됨)
  _UNICODE(유니코드) 정의됨   TCHAR 통합형(권장)
파일 열기 fopen_s _wfopen_s _tfopen_s
파일 쓰기(스트림 출력) fprintf_s fwprintf_s _ftprintf_s
 스트림에서 문자열 읽기 fgets fgetws _fgetts
       

 

unsigned char -> _TUCHAR

strtol -> _tcstol 

strtok_s -> _tcstok_s

 

Generic-Text Routine Name SBCS (_UNICODE & MBCS Not Defined) _MBCS Defined _UNICODE Defined
_fgettc fgetc fgetc fgetwc
_fgettchar fgetchar fgetchar _fgetwchar
_fgetts fgets fgets fgetws
_fputtc fputc fputc fputwc
_fputtchar fputchar fputchar _fputwchar
_fputts fputs fputs fputws
_ftprintf fprintf fprintf fwprintf
_ftscanf fscanf fscanf fwscanf
_gettc getc getc getwc
_gettchar getchar getchar getwchar
_getts gets gets getws
_istalnum isalnum _ismbcalnum iswalnum
_istalpha isalpha _ismbcalpha iswalpha
_istascii __isascii __isascii iswascii
_istcntrl iscntrl iscntrl iswcntrl
_istdigit isdigit _ismbcdigit iswdigit
_istgraph isgraph _ismbcgraph iswgraph
_istlead Always returns false _ismbblead Always return false
_istleadbyte Always returns false isleadbyte Always returns false
_istlegal Always returns true _ismbclegal Always returns true
_istlower islower _ismbclower iswlower
_istprint isprint _ismbcprint iswprint
_istpunct ispunct _ismbcpunct iswpunct
_istspace isspace _ismbcspace iswspace
_istupper isupper _ismbcupper iswupper
_istxdigit isxdigit isxdigit iswxdigit
_itot _itoa _itoa _itow
_ltot _ltoa _ltoa _ltow
_puttc putc putc putwc
_puttchar putchar putchar putwchar
_putts puts puts putws
_tmain main main wmain
_sntprintf _snprintf _snprintf _snwprintf
_stprintf sprintf sprintf swprintf
_stscanf sscanf sscanf swscanf
_taccess _access _access _waccess
_tasctime asctime asctime _wasctime
_tccpy Maps to macro or inline function _mbccpy Maps to macro or inline function
_tchdir _chdir _chdir _wchdir
_tclen Maps to macro or inline function _mbclen Maps to macro or inline function
_tchmod _chmod _chmod _wchmod
_tcreat _creat _creat _wcreat
_tcscat strcat _mbscat wcscat
_tcschr strchr _mbschr wcschr
_tcsclen strlen _mbslen wcslen
_tcscmp strcmp _mbscmp wcscmp
_tcscoll strcoll _mbscoll wcscoll
_tcscpy strcpy _mbscpy wcscpy
_tcscspn strcspn _mbscspn wcscspn
_tcsdec _strdec _mbsdec _wcsdec
_tcsdup _strdup _mbsdup _wcsdup
_tcsftime strftime strftime wcsftime
_tcsicmp _stricmp _mbsicmp _wcsicmp
_tcsicoll _stricoll _stricoll _wcsicoll
_tcsinc _strinc _mbsinc _wcsinc
_tcslen strlen strlen wcslen
_tcslwr _strlwr _mbslwr _wcslwr
_tcsnbcnt _strncnt _mbsnbcnt _wcnscnt
_tcsncat strncat _mbsnbcat wcsncat
_tcsnccat strncat _mbsncat wcsncat
_tcsncmp strncmp _mbsnbcmp wcsncmp
_tcsnccmp strncmp _mbsncmp wcsncmp
_tcsnccnt _strncnt _mbsnccnt _wcsncnt
_tcsnccpy strncpy _mbsncpy wcsncpy
_tcsncicmp _strnicmp _mbsnicmp _wcsnicmp
_tcsncpy strncpy _mbsnbcpy wcsncpy
_tcsncset _strnset _mbsnset _wcsnset
_tcsnextc _strnextc _mbsnextc _wcsnextc
_tcsnicmp _strnicmp _mbsnicmp _wcsnicmp
_tcsnicoll _strnicoll _strnicoll _wcsnicoll
_tcsninc _strninc _mbsninc _wcsninc
_tcsnccnt _strncnt _mbsnccnt _wcsncnt
_tcsnset _strnset _mbsnbset _wcsnset
_tcspbrk strpbrk _mbspbrk wcspbrk
_tcsspnp _strspnp _mbsspnp _wcsspnp
_tcsrchr strrchr _mbsrchr wcsrchr
_tcsrev _strrev _mbsrev _wcsrev
_tcsset _strset _mbsset _wcsset
_tcsspn strspn _mbsspn wcsspn
_tcsstr strstr _mbsstr wcsstr
_tcstod strtod strtod wcstod
_tcstok strtok _mbstok wcstok
_tcstol strtol strtol wcstol
_tcstoul strtoul strtoul wcstoul
_tcsupr _strupr _mbsupr _wcsupr
_tcsxfrm strxfrm strxfrm wcsxfrm
_tctime ctime ctime _wctime
_texecl _execl _execl _wexecl
_texecle _execle _execle _wexecle
_texeclp _execlp _execlp _wexeclp
_texeclpe _execlpe _execlpe _wexeclpe
_texecv _execv _execv _wexecv
_texecve _execve _execve _wexecve
_texecvp _execvp _execvp _wexecvp
_texecvpe _execvpe _execvpe _wexecvpe
_tfdopen _fdopen _fdopen _wfdopen
_tfindfirst _findfirst _findfirst _wfindfirst
_tfindnext _findnext _findnext _wfindnext
_tfopen fopen fopen _wfopen
_tfreopen freopen freopen _wfreopen
_tfsopen _fsopen _fsopen _wfsopen
_tfullpath _fullpath _fullpath _wfullpath
_tgetcwd _getcwd _getcwd _wgetcwd
_tgetenv getenv getenv _wgetenv
_tmain main main wmain
_tmakepath _makepath _makepath _wmakepath
_tmkdir _mkdir _mkdir _wmkdir
_tmktemp _mktemp _mktemp _wmktemp
_tperror perror perror _wperror
_topen _open _open _wopen
_totlower tolower _mbctolower towlower
_totupper toupper _mbctoupper towupper
_tpopen _popen _popen _wpopen
_tprintf printf printf wprintf
_tremove remove remove _wremove
_trename rename rename _wrename
_trmdir _rmdir _rmdir _wrmdir
_tsearchenv _searchenv _searchenv _wsearchenv
_tscanf scanf scanf wscanf
_tsetlocale setlocale setlocale _wsetlocale
_tsopen _sopen _sopen _wsopen
_tspawnl _spawnl _spawnl _wspawnl
_tspawnle _spawnle _spawnle _wspawnle
_tspawnlp _spawnlp _spawnlp _wspawnlp
_tspawnlpe _spawnlpe _spawnlpe _wspawnlpe
_tspawnv _spawnv _spawnv _wspawnv
_tspawnve _spawnve _spawnve _wspawnve
_tspawnvp _spawnvp _spawnvp _tspawnvp
_tspawnvpe _spawnvpe _spawnvpe _tspawnvpe
_tsplitpath _splitpath _splitpath _wsplitpath
_tstat _stat _stat _wstat
_tstrdate _strdate _strdate _wstrdate
_tstrtime _strtime _strtime _wstrtime
_tsystem system system _wsystem
_ttempnam _tempnam _tempnam _wtempnam
_ttmpnam tmpnam tmpnam _wtmpnam
_ttoi atoi atoi _wtoi
_ttol atol atol _wtol
_tutime _utime _utime _wutime
_tWinMain WinMain WinMain wWinMain
_ultot _ultoa _ultoa _ultow
_ungettc ungetc ungetc ungetwc
_vftprintf vfprintf vfprintf vfwprintf
_vsntprintf _vsnprintf _vsnprintf _vsnwprintf
_vstprintf vsprintf vsprintf vswprintf
_vtprintf vprintf vprintf vwprintf
반응형

+ Recent posts