是否建议使用 strcmp 或 _tcscmp 来比较 Unicode 版本中的字符串? [英] Is it advisable to use strcmp or _tcscmp for comparing strings in Unicode versions?

查看:82
本文介绍了是否建议使用 strcmp 或 _tcscmp 来比较 Unicode 版本中的字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否建议使用 strcmp 或 _tcscmp 来比较 Unicode 版本中的字符串?

Is it advisable to use strcmp or _tcscmp for comparing strings in Unicode versions?

推荐答案

_tcscmp() 是一个宏.如果你定义了UNICODE,它将使用wcscmp(),否则它将使用strcmp().

_tcscmp() is a macro. If you define UNICODE it will use wcscmp(), otherwise it will use strcmp().

注意TCHARPTSTR等类型是类似的.如果定义了 UNICODECHARPSTR,它们将是 WCHARPWSTR否则.

Note the types TCHAR, PTSTR, etc. are similar. They will be WCHAR and PWSTR if you define UNICODE, and CHAR and PSTR otherwise.

这篇关于是否建议使用 strcmp 或 _tcscmp 来比较 Unicode 版本中的字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆