Perl lcfirst 函数
描述
This function returns the string EXPR or $_ with the first character lowercased.
语法
以下是此函数的简单语法 −
lcfirst EXPR lfirstc
返回值
This function returns the string EXPR or $_ with the first character lowercased.
示例
以下是显示其基本用法的示例代码 −
#!/usr/bin/perl $orig_string = "This is Test and CAPITAL"; $changed_string = lcfirst( $orig_string ); print "Changes String is : $changed_string\n";
执行上述代码时,会产生以下结果 −
Changes String is : this is Test and CAPITAL