- Added the documentation for lcfirst with basic example

- Added crosslinks to strtolower/upper, ucfirst and ucwords
- Added crosslinks to lcfirst in ucfirst.xml


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@250918 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
David Coallier 2008-01-19 20:58:12 +00:00
parent 045b5b22c3
commit 5f6cfdc748
2 changed files with 106 additions and 1 deletions

View file

@ -0,0 +1,104 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.lcfirst">
<refnamediv>
<refname>lcfirst</refname>
<refpurpose>Make a string's first character lowercase</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>lcfirst</methodname>
<methodparam><type>string</type><parameter>str</parameter></methodparam>
</methodsynopsis>
<para>
Returns a string with the first character of
<parameter>str</parameter> , lowercased if that character is
alphabetic.
</para>
<para>
Note that 'alphabetic' is determined by the current locale. For
instance, in the default "C" locale characters such as umlaut-a
(&auml;) will not be converted.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>str</parameter></term>
<listitem>
<para>
The input string.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the resulting string.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>lcfirst</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$foo = 'HelloWorld';
$foo = lcfirst($foo); // helloWorld
$bar = 'HELLO WORLD!';
$bar = lcfirst($bar); // hELLO WORLD!
$bar = lcfirst(strtoupper($bar)); // hELLO WORLD!
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>ucfirst</function></member>
<member><function>strtolower</function></member>
<member><function>strtoupper</function></member>
<member><function>ucwords</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.ucfirst">
<refnamediv>
<refname>ucfirst</refname>
@ -72,6 +72,7 @@ $bar = ucfirst(strtolower($bar)); // Hello world!
&reftitle.seealso;
<para>
<simplelist>
<member><function>lcfirst</function></member>
<member><function>strtolower</function></member>
<member><function>strtoupper</function></member>
<member><function>ucwords</function></member>