mirror of
https://github.com/php/doc-de.git
synced 2026-04-25 07:58:12 +02:00
178 lines
4.6 KiB
XML
178 lines
4.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: 45042fef652f1b4e904e809fcbfcf31f6c60670b Maintainer: sammywg Status: ready -->
|
|
<!-- Reviewed: yes -->
|
|
<!-- Rev-Revision: 0e81411492de9b6813d288a27dd0288886bc694b Reviewer: samesch -->
|
|
<refentry xml:id="function.ucwords" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>ucwords</refname>
|
|
<refpurpose>
|
|
Wandelt jeden ersten Buchstaben eines Wortes innerhalb eines Strings in
|
|
einen Großbuchstaben um
|
|
</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>ucwords</methodname>
|
|
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>separators</parameter><initializer>" \t\r\n\f\v"</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Gibt einen String zurück, in dem das erste Zeichen eines jeden Wortes
|
|
innerhalb von <parameter>string</parameter> in einen Großbuchstaben
|
|
umgewandelt wird, sofern es ein ASCII-Zeichen im Bereich von
|
|
<literal>"a"</literal> (0x61) bis <literal>"z"</literal> (0x7a) ist.
|
|
</para>
|
|
<para>
|
|
Bei dieser Funktion ist ein Wort ein Folge von Zeichen, die nicht im
|
|
Parameter <parameter>separators</parameter> aufgeführt sind. Standardmäßig
|
|
sind dies: Leerzeichen, horizontaler Tabulator, Wagenrücklauf,
|
|
Zeilenumbruch, Seitenvorschub und vertikaler Tabulator.
|
|
</para>
|
|
<para>
|
|
Um eine ähnliche Umwandlung bei Multibyte-Zeichenfolgen vorzunehmen, muss
|
|
die Funktion <function>mb_convert_case</function> mit dem Modus
|
|
<constant>MB_CASE_TITLE</constant> verwendet werden.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>string</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Die Eingabezeichenkette.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>separators</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Der optionale Parameter <parameter>separators</parameter> enthält die
|
|
Wort-Trenzeichen.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Gibt die modifizierte Zeichenkette zurück.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
&strings.changelog.ascii-case-conversion;
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>ucwords</function>-Beispiel</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$foo = 'hallo welt!';
|
|
echo ucwords($foo), PHP_EOL; // Hallo Welt!
|
|
|
|
$bar = 'HALLO WELT!';
|
|
echo ucwords($bar), PHP_EOL; // HALLO WELT!
|
|
echo ucwords(strtolower($bar)), PHP_EOL; // Hallo Welt!
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title><function>ucwords</function>-Beispiel mit benutzerdefinierten Trenzeichen</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$foo = 'hallo|welt!';
|
|
echo ucwords($foo), PHP_EOL; // Hallo|welt!
|
|
|
|
echo ucwords($foo, "|"), PHP_EOL; // Hallo|Welt!
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title><function>ucwords</function>-Beispiel mit zusätzlichen Trennzeichen</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$foo = "mike o'hara";
|
|
echo ucwords($foo), PHP_EOL; // Mike O'hara
|
|
|
|
echo ucwords($foo, " \t\r\n\f\v'"), PHP_EOL; // Mike O'Hara
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
¬e.bin-safe;
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>strtoupper</function></member>
|
|
<member><function>strtolower</function></member>
|
|
<member><function>ucfirst</function></member>
|
|
<member><function>mb_convert_case</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:"~/.phpdoc/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
|
|
-->
|