mirror of
https://github.com/php/doc-de.git
synced 2026-04-28 09:23:18 +02:00
11e50f3c47
git-svn-id: https://svn.php.net/repository/phpdoc/de/trunk@297032 c90b9560-bf6c-de11-be94-00142212c4b1
151 lines
4.1 KiB
XML
151 lines
4.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: sammywg Status: ready -->
|
|
|
|
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.strripos">
|
|
<refnamediv>
|
|
<refname>strripos</refname>
|
|
<refpurpose>Findet das letzte Vorkommen der gesuchten Zeichenkette in einem
|
|
String, unabhängig von Groß- und Kleinschreibung</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>int</type><methodname>strripos</methodname>
|
|
<methodparam><type>string</type><parameter>haystack</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>needle</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>offset</parameter><initializer>0</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Findet das letzte Vorkommen der gesuchten Zeichenkette in einem String,
|
|
unabhängig von Groß- und Kleinschreibung. Im Gegensatz zu
|
|
<function>strrpos</function> beachtet <function>strripos</function> die
|
|
Groß- und Kleinschreibung nicht.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>haystack</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Die Zeichenkette, in der gesucht werden soll.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>needle</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Beachten Sie, dass <parameter>needle</parameter> eine Zeichenkette aus
|
|
einem oder mehreren Zeichen sein kann.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>offset</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Der Parameter <parameter>offset</parameter> kann angegeben werden, wenn
|
|
eine beliebige Anzahl Zeichen in einem String gesucht werden soll.
|
|
</para>
|
|
<para>
|
|
Negative Offset-Werte beginnen die Suche bei dem in
|
|
<parameter>offset</parameter> angegebenen Zeichen ab
|
|
<emphasis>Beginn</emphasis> des Strings.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Gibt die numerische Position des letzten Vorkommens von
|
|
<parameter>needle</parameter> zurück. Beachten Sie außerdem, dass die
|
|
Funktion bei 0 zu zählen beginnt, nicht bei 1.
|
|
</para>
|
|
<para>
|
|
Wenn <parameter>needle</parameter> nicht gefunden wird, gibt die Funktion
|
|
&false; zurück.
|
|
</para>
|
|
&return.falseproblem;
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Ein einfaches <function>strripos</function>-Beispiel</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$haystack = 'ababcd';
|
|
$needle = 'aB';
|
|
|
|
$pos = strripos($haystack, $needle);
|
|
|
|
if ($pos === false) {
|
|
echo "Leider wurde ($needle) nicht in ($haystack) gefunden.";
|
|
} else {
|
|
echo "Glückwunsch!\n";
|
|
echo "Das letzte Vorkommen von ($needle) in ($haystack) ist an Position ($pos).";
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
Glückwunsch!
|
|
Das letzte Vorkommen von (aB) in (ababcd) ist an Position (2).
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>strpos</function></member>
|
|
<member><function>stripos</function></member>
|
|
<member><function>strrchr</function></member>
|
|
<member><function>substr</function></member>
|
|
<member><function>stristr</function></member>
|
|
<member><function>strstr</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
|
|
-->
|