eygle.com   eygle.com
eygle.com  
 

« 使用ERRORSTACK进行错误跟踪及诊断 | Blog首页 | Oracle WareHouse Builder培训 »

使用toupper/tolower函数进行大小写转换

作者:eygle |【转载时请以超链接形式标明文章和作者信息及本声明
链接:
站内相关文章|Related Articles
toupper和tolower是Linux下的大小写转换函数,结合awk可以一起用于文本转换:
[oracle@jumper oracle]$ cat a|awk '{print toupper($0)}'
THIS IS A SAMPLE.
FOR TEST.
[oracle@jumper oracle]$ 

以下是toupper和tolower函数的参考手册:

[oracle@jumper oracle]$ man toupper
TOUPPER(3)                 Linux Programmer  Manual                TOUPPER(3)

NAME
       toupper, tolower - convert letter to upper or lower case

SYNOPSIS
       #include 

       int toupper(int c);
       int tolower(int c);

DESCRIPTION
       toupper() converts the letter c to upper case, if possible.

       tolower() converts the letter c to lower case, if possible.

       If  c  is  not  an  unsigned char value, or EOF, the behaviour of these
       functions is undefined.

RETURN VALUE
       The value returned is that of the converted letter, or c if the conver-
       sion was not possible.

CONFORMING TO
       ANSI C, BSD 4.3

BUGS
       The details of what constitutes an uppercase or lowercase letter depend
       on the current locale.  For example, the default "C"  locale  does  not
       know about umlauts, so no conversion is done for them.

       In some non - English locales, there are lowercase letters with no cor-
       responding uppercase equivalent; the German sharp s is one example.

SEE ALSO
       isalpha(3), setlocale(3), locale(7)

GNU                               1993-04-04                        TOUPPER(3)

小技巧,仅供参考.
-----
这篇 【使用toupper/tolower函数进行大小写转换】来自 www.eygle.com | CSDN技术网摘| del.icio.us|365Key

By eygle on 2005-03-16 10:17 | Comments (0) | Posted to Unix&Linux | Edit |Pageviews:

相关文章 随机文章
开始一段假期 广州成都还有北京
2007 年终总结-Eygle.Com的发展历程
杭州景美 阿里情深 诺顿害人
美如昙花只一现
Windows Live Messenger可以自由申请
网上相关主题:
Google

留言 (0)

发表留言:



Remember Me?
(输入验证码后方可评论,谢谢支持)



CopyRight © 2004 eygle.com, All rights reserved.