当前位置: 首页>>代码示例>>C++>>正文


C++ ToUpper函数代码示例

本文整理汇总了C++中ToUpper函数的典型用法代码示例。如果您正苦于以下问题:C++ ToUpper函数的具体用法?C++ ToUpper怎么用?C++ ToUpper使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ToUpper函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: sSwapCase

static WString sSwapCase(const WString& s)
{
	WStringBuffer r;
	r.SetCount(s.GetCount());
	for(int i = 0; i < s.GetCount(); i++)
		r[i] = IsUpper(s[i]) ? ToLower(s[i]) : ToUpper(s[i]);
	return r;
}
开发者ID:andreincx,项目名称:upp-mirror,代码行数:8,代码来源:idetool.cpp

示例2: FormKeyUp

void __fastcall TTestBedForm::FormKeyUp(TObject *Sender, WORD &Key, System::WideChar &KeyChar,
          TShiftState Shift)
{
  if (test)
  {
    test->KeyboardUp(static_cast<int>(ToUpper(KeyChar)));
  }
}
开发者ID:Appmethod,项目名称:AppmethodDemos,代码行数:8,代码来源:MainForm.cpp

示例3: tmbstrtoupper

/* Transform ASCII chars in string to upper case */
tmbstr tmbstrtoupper(tmbstr s)
{
    tmbstr cp;

    for (cp = s; *cp; ++cp)
        *cp = (tmbchar)ToUpper(*cp);

    return s;
}
开发者ID:Eidolian,项目名称:qt-gmail-access,代码行数:10,代码来源:tmbstr.c

示例4: ircncmp

int
ircncmp(const char* s1, const char *s2, size_t n)
{
  const unsigned char *str1 = (const unsigned char *) s1;
  const unsigned char *str2 = (const unsigned char *) s2;
  int res;

  assert(s1 != NULL);
  assert(s2 != NULL);

  while ((res = ToUpper(*str1) - ToUpper(*str2)) == 0)
  {
    str1++, str2++, n--;
    if (n == 0 || (*str1 == '\0' && *str2 == '\0'))
      return 0;
  }
  return res;
}
开发者ID:mdharris,项目名称:ircd,代码行数:18,代码来源:match.c

示例5: irccmp

/*
 * irccmp - case insensitive comparison of two 0 terminated strings.
 *
 *      returns  0, if s1 equal to s2
 *              <0, if s1 lexicographically less than s2
 *              >0, if s1 lexicographically greater than s2
 */
int irccmp(const char *s1, const char *s2)
{
  const unsigned char* str1 = (const unsigned char*) s1;
  const unsigned char* str2 = (const unsigned char*) s2;
  int   res;

  assert(s1 != NULL);
  assert(s2 != NULL);
  
  while ((res = ToUpper(*str1) - ToUpper(*str2)) == 0)
  {
    if (*str1 == '\0')
      return 0;
    str1++;
    str2++;
  }
  return (res);
}
开发者ID:Cloudxtreme,项目名称:ircd-ratbox,代码行数:25,代码来源:match.c

示例6: HotKey

	virtual bool HotKey(dword key) {
		if(TopWindow::HotKey(key))
			return true;
		if(IsAlpha(key))
			return TopWindow::HotKey(K_ALT_A + ToUpper((int)key) - 'A');
		if(key == K_ESCAPE && esc)
			b->PseudoPush();
		return false;
	}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:9,代码来源:Prompt.cpp

示例7: get_depth_write_mask_string

wrBuffer get_depth_write_mask_string( const wrName& s )
{
	if( s.IsEmpty() ) {
		return wrBuffer("D3D11_DEPTH_WRITE_MASK_ALL");
	}
	wrBuffer	buf("D3D11_DEPTH_WRITE_MASK_");
	buf += ToUpper( s );
	return buf;
}
开发者ID:S-V,项目名称:Lollipop,代码行数:9,代码来源:HLSLWrapperGenerator.cpp

示例8: get_depth_func_string

wrBuffer get_depth_func_string( const wrName& s )
{
	if( s.IsEmpty() ) {
		return wrBuffer("D3D11_COMPARISON_LESS");
	}
	wrBuffer	buf("D3D11_COMPARISON_");
	buf += ToUpper( s );
	return buf;
}
开发者ID:S-V,项目名称:Lollipop,代码行数:9,代码来源:HLSLWrapperGenerator.cpp

示例9: GetTextureAddressMode

wrBuffer GetTextureAddressMode( const wrName& addrMode )
{
	if( addrMode.IsEmpty() ) {
		return wrBuffer("D3D11_TEXTURE_ADDRESS_CLAMP");
	}
	wrBuffer	buf("D3D11_TEXTURE_ADDRESS_");
	buf += ToUpper( addrMode );
	return buf;
}
开发者ID:S-V,项目名称:Lollipop,代码行数:9,代码来源:HLSLWrapperGenerator.cpp

示例10: Get_Filter

wrBuffer Get_Filter( const wrName& filter )
{
	if( filter.IsEmpty() ) {
		return wrBuffer("D3D11_FILTER_MIN_MAG_MIP_LINEAR");
	}
	wrBuffer	buf("D3D11_FILTER_");
	buf += ToUpper( filter );
	return buf;
}
开发者ID:S-V,项目名称:Lollipop,代码行数:9,代码来源:HLSLWrapperGenerator.cpp

示例11: irccmp

/*
 * irccmp - case insensitive comparison of two 0 terminated strings.
 *
 *      returns  0, if s1 equal to s2
 *               1, if not
 */
int
irccmp(const char *s1, const char *s2)
{
  const unsigned char *str1 = (const unsigned char *)s1;
  const unsigned char *str2 = (const unsigned char *)s2;

  assert(s1 != NULL);
  assert(s2 != NULL);
  
  while (ToUpper(*str1) == ToUpper(*str2))
  {
    if (*str1 == '\0')
      return(0);
    str1++;
    str2++;
  }
  return(1);
}
开发者ID:BackupTheBerlios,项目名称:shadowircd,代码行数:24,代码来源:match.c

示例12: irccasecanon

void irccasecanon(char *str)
{
	while (*str)
	{
		*str = ToUpper(*str);
		str++;
	}
	return;
}
开发者ID:ItsAGeekThing,项目名称:Xtheme,代码行数:9,代码来源:match.c

示例13: ChooseAccessKey

int  ChooseAccessKey(const char *text, dword used)
{
	for(const char *s = text; *s; s++) {
		byte ac = *s;
		if(ac < 128 && ac >= 'A' && ac <= 'Z' && (Ctrl::AccessKeyBit(ac) & used) == 0)
			return MAKELONG(ac, s - text + 1);
	}
	for(const char *s = text; *s; s++) {
		byte ac = ToUpper(*s);
		if(ac < 128 && ac >= 'A' && ac <= 'Z' && ac != 'I' && ac != 'L' && (Ctrl::AccessKeyBit(ac) & used) == 0)
			return ac;
	}
	for(const char *s = text; *s; s++) {
		byte ac = ToUpper(*s);
		if(ac < 128 && ac >= 'A' && ac <= 'Z' && (Ctrl::AccessKeyBit(ac) & used) == 0)
			return ac;
	}
	return 0;
}
开发者ID:pedia,项目名称:raidget,代码行数:19,代码来源:LabelBase.cpp

示例14: StartsWithVowel

u32 StartsWithVowel(char* pointer)
{
	char c = pointer[0];
	c = ToUpper(c);
	if (c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U')
	{
		return true;
	}
	return false;
}
开发者ID:cosarara97,项目名称:GBA-Pokemon-Engine,代码行数:10,代码来源:TextFunctions.cpp

示例15: getCapsUsingProductId

static CDROM_DeviceCapabilities getCapsUsingProductId(const char* prodID)
{
	std::string productID;
	auto strID = as_string(prodID);

	std::for_each(CONST_RANGE(strID, i)
	{
		if (IsAlpha(i))
			productID.push_back(ToUpper(i));
	});
开发者ID:Frankie-666,项目名称:farmanager,代码行数:10,代码来源:cddrv.cpp


注:本文中的ToUpper函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。