本文整理汇总了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;
}
示例2: FormKeyUp
void __fastcall TTestBedForm::FormKeyUp(TObject *Sender, WORD &Key, System::WideChar &KeyChar,
TShiftState Shift)
{
if (test)
{
test->KeyboardUp(static_cast<int>(ToUpper(KeyChar)));
}
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例12: irccasecanon
void irccasecanon(char *str)
{
while (*str)
{
*str = ToUpper(*str);
str++;
}
return;
}
示例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;
}
示例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;
}
示例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));
});