当前位置:首页 » Perl » Perl lcfirst()函数

Perl lcfirst()函数

perl lcfirst()函数例子,lcfirst()函数学习例子,lcfirst()函数实例代码,lcfirst()函数在线教程等

语法

lcfirst EXPR

lfirstc


定义和用法

返回字符串EXPR或$_第一个字符小写。

返回值

    第一个字符的小写格式

例子

试试下面的例子,复制和过去的这个例子test.pl文件,然后对结果进行验证:

#!/usr/bin/perl

$orig_string = "This is Test and CAPITAL";

$changed_string = lcfirst( $orig_string );

print "Changes String is : $changed_string\n";

It will produce following result
#by www.gitbook.net

Changes String is : this is Test and CAPITAL