zoukankan      html  css  js  c++  java
  • c 大小写转换

    /* towctrans example */
    #include <stdio.h>
    #include <wctype.h>
    int main ()
    {
        int i=0;
        wchar_t str[] = L"Test String.
    ";
        wchar_t c;
        wctype_t check = wctype("lower");   /* 小写类型 */
        wctrans_t trans = wctrans("toupper");   /* 小写函数构造 */
        while (str[i])
        {
            c = str[i];
            /*如果是小写就转为大写*/
            if (iswctype(c,check)){      /* 判断是否时小写类型 */
                c = towctrans(c,trans); /* 将要使用的函数传入转换函数 */
            }
            putchar (c);  /*输出 c */
            i++;
        }
        return 0;
    }
  • 相关阅读:
    类和对象
    关联查询
    重点函数
    三大范式
    主外键
    软件开发的项目周期
    什么是事务
    索引
    视图
    数据库对象
  • 原文地址:https://www.cnblogs.com/sea-stream/p/10893322.html
Copyright © 2011-2022 走看看