文字列操作関数一覧
ランタイム名称 | char用 | wchar_t用 | TCHAR用 | マルチバイト用 |
---|---|---|---|---|
strlen | strnlen | wcsnlen | _tcsnlen / _tcscnlen | _mbsnlen |
strcpy | strcpy_s | wcscpy_s | _tcscpy_s | _mbscpy_s |
strncpy | strncpy_s | wcsncpy_s | _tcsncpy_s | _mbsncpy_s |
strcat | strcat_s | wcscat_s | _tcscat_s | _mbscat_s |
strncat | strncat_s | wcsncat_s | _tcsncat_s | _mbsncat_s |
strtok | strtok_s | wcstok_s | _tcstok_s | _mbstok_s |
_splitpath | _splitpath_s | _wsplitpath_s | _tsplitpath_s | |
_makepath | _makepath_s | _wmakepath_s | _tmakepath_s | |
printf | printf_s | wprintf_s | _tprintf_s | |
sprintf | sprintf_s | swprintf_s | _stprintf_s | |
vsprintf | vsprintf_s | vswprintf_s | _vstprintf_s |
セキュリティ強化版はVisual C++ 2005から使用可能
マルチバイト用がない場合はchar用を使用する
ランタイム名称(char用) | wchar_t用 | TCHAR用 | マルチバイト用 |
---|---|---|---|
strcmp | wcscmp | _tcscmp | _mbscmp |
strncmp | wcsncmp | _tcsncmp | _mbsncmp |
_strnicmp | _wcsnicmp | _tcsncicmp | _mbsnicmp |
strstr | wcsstr | _tcsstr | _mbsstr |
strcspn | wcscspn | _tcscspn | _mbscspn |