windows API 第八篇 _tcsicmp _stricmp _wcsicmp _mbsicmp
Perform a lowercase comparison of strings.
函数原型:
int _stricmp( const char
*string1, const char *string2
); //#include <string.h>
int _wcsicmp( const wchar_t
*string1, const wchar_t
*string2 ); //#include <string.h> or <wchar.h>
int _mbsicmp( const unsigned char
*string1, const unsigned char_t
*string2 ); //#include <mbstring.h>
返回值:
: string1 identical to string2 <0:string1 less than string2 >0:string1 greater than string2
举例:
char *str1 = "abc";
char *str2 = "AbC";
int nResult = _stricmp(str1, str2); //nResult = 0
wchar_t szStr1[] = "asdfg";
wchar_t szStr2[] = "AsDfG";
int nResult = _wcsicmp(szStr1, szStr2); //nResult = 0
至于_mbsicmp是比较无符号字符串的,可根据情况自行使用
windows API 第八篇 _tcsicmp _stricmp _wcsicmp _mbsicmp的更多相关文章
- windows API 第22篇 WTSGetActiveConsoleSessionId
函数原型:DWORD WTSGetActiveConsoleSessionId (VOID)先看一下原文介绍: The WTSGetActiveConsoleSessionId function re ...
- windows API 第13篇 MoveFileEx
上一篇介绍了MoveFile,这次分析MoveFileEx,它是MoveFile的扩展函数,功能还要更加强大些.先看定义: BOOL WINAPI MoveFileEx( _In_ LPCTS ...
- Windows API 第六篇 GetLocalTime
GetLocalTime获取系统时间信息.函数原型:VOID WINAPI GetLocalTime( __out LPSYSTEMTIME lpSystemTime ); 先来看S ...
- Windows API 第三篇
1.获得程序自身的路径: DWORD GetModuleFileName( HMODULE hModule, // handle to module LPTSTR lpFilename, // pat ...
- Windows API 第21篇 DeleteVolumeMountPoint 删除挂载点
函数原型:BOOL DeleteVolumeMountPoint( LPCTSTR lpszV ...
- Windows API 第20篇 SetVolumeMountPoint 设置卷挂载点参数错误
函数原型:BOOL SetVolumeMountPoint( IN LPCTSTR lpszVo ...
- Windows API 第20篇 GetVolumeNameForVolumeMountPoint
函数原型: BOOL GetVolumeNameForVolumeMountPoint( ...
- Windows API 第19篇 FindFirstVolumeMountPoint FindNextVolumeMountPoint
相关函数:HANDLE FindFirstVolumeMountPoint( ...
- windows API 第 18篇 FindFirstVolume FindNextVolume
函数定义:Retrieves the name of a volume on a computer. FindFirstVolume is used to begin scanning the vol ...
随机推荐
- Android开发 navigation的跳转动画实现
前言 此篇博客只简短的介绍navigation如何添加跳转页面的动画属性,如果你还为接触了解过navigation.建议你看我另一篇博客Android开发 navigation入门详解 创建动画xml ...
- php+jquery 上拉加载
<script type="text/javascript"> var resflow = true,pages =2; var ps=$("#ids&quo ...
- for in循环介绍以及陷阱
大家都知道在JavaScript中提供了两种方式迭代对象: (1)for 循环: (2)for..in循环: 使用for循环进行迭代数组对象,想必大家都已经司空见惯了.但是,使用for.. in循环时 ...
- kubernetes istio之gateway
[root@master istio-]# kubectl apply -f samples/httpbin/httpbin.yaml service/httpbin created deployme ...
- type元类创建类的方法
一.代码 class_name='car' dict_name={} bases=(object,) class_body=''' def __init__(self,name): self.name ...
- tomcat JAVA_OPTS设置
原文地址:https://blog.csdn.net/bamboo_cqh/article/details/72820700 AVA_OPTS ,顾名思义,是用来设置JVM相关运行参数的变量. JVM ...
- STM32 STM32F4 寄存器怎么配置不上, 无法往寄存器写入数据
当出现这个问题时,往往是因为你没有在RCC寄存器中把相关的时钟使能打开. 配置寄存器之前记得调用"RCC_AxxxPeriphClockCmd"先打开需要配置的时钟源,别调用了“R ...
- POJ-2499-Binary Tree-思维题
Background Binary trees are a common data structure in computer science. In this problem we will loo ...
- Day 6:集合(set)
集合(set)定义:由不同元素组成的集合,集合中是一组无序排列的可hash值,可以作为字典的key特性:集合里面数据类型是不可变的1.可变的数据类型:列表,字典2.不可变的数据类型:数字.元组.字符串 ...
- [Ceoi2016|BZOJ4936] Match
哈希+分治+stack 题目: 给你一个由小写字母组成的字符串s,要你构造一个字典序最小的(认为左括号的字典序比右括号小)合法的括号 序列与这个字符串匹配,字符串和括号序列匹配定义为:首先长度必须相等 ...