cvs: phpdoc-da /reference/strings/functions rtrim.xml
[email protected] ("Tom Sommer")
| Newsgroups | php.doc.da |
|---|---|
| Message-ID | <cvstomsommer1088272746@cvsserver> |
tomsommer Sat Jun 26 13:59:06 2004 EDT
Added files:
/phpdoc-da/reference/strings/functions rtrim.xml
Log:
Initial translation
http://cvs.php.net/co.php/phpdoc-da/reference/strings/functions/rtrim.xml?r=1.1&p=1
Index: phpdoc-da/reference/strings/functions/rtrim.xml
+++ phpdoc-da/reference/strings/functions/rtrim.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- EN-Revision: 1.3 Maintainer: tomsommer Status: ready -->
<refentry id="function.rtrim">
<refnamediv>
<refname>rtrim</refname>
<refpurpose>
Fjerner whitespace fra enden af en streng
</refpurpose>
</refnamediv>
<refsect1>
<title>Beskrivelse</title>
<methodsynopsis>
<type>string</type><methodname>rtrim</methodname>
<methodparam><type>string</type><parameter>str</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>charlist</parameter></methodparam>
</methodsynopsis>
<note>
<simpara>
Den anden parameter var tilføjet i 4.1.0
</simpara>
</note>
<para>
Denne funktion returnere en streng med whitespace fjernet fra
enden af <parameter>str</parameter>.
Uden den anden parameter,
vil <function>rtrim</function> fjerne disse tegn:
<!-- sorted by importance. Printed 3 times: trim, ltrim, rtrim -->
<itemizedlist>
<listitem>
<simpara>
" " (<acronym>ASCII</acronym> <literal>32</literal>
(<literal>0x20</literal>)), et normalt mellemrum.
</simpara>
</listitem>
<listitem>
<simpara>
"\t" (<acronym>ASCII</acronym> <literal>9</literal>
(<literal>0x09</literal>)), et tabulatortegn.
</simpara>
</listitem>
<listitem>
<simpara>
"\n" (<acronym>ASCII</acronym> <literal>10</literal>
(<literal>0x0A</literal>)), en ny linie (line feed).
</simpara>
</listitem>
<listitem>
<simpara>
"\r" (<acronym>ASCII</acronym> <literal>13</literal>
(<literal>0x0D</literal>)), carriage return.
</simpara>
</listitem>
<listitem>
<simpara>
"\0" (<acronym>ASCII</acronym> <literal>0</literal>
(<literal>0x00</literal>)), <literal>NUL</literal>-byte.
</simpara>
</listitem>
<listitem>
<simpara> <!-- not \v, since not supported by PHP -->
"\x0B" (<acronym>ASCII</acronym> <literal>11</literal>
(<literal>0x0B</literal>)), et vertikalt tabulatortegn.
</simpara>
</listitem>
</itemizedlist>
</para>
<para>
Du kan også specificere de tegn du ønsker at fjerne, ved brug
af <parameter>charlist</parameter> parameteren.
Indtast blot en liste af alle de tegn du vil have fjernet. Med
<literal>..</literal> kan du specificere en hel række af tegn.
</para>
<example>
<title>Eksempel på brug af <function>rtrim</function></title>
<para>
<programlisting role="php">
<![CDATA[
<?php
$tekst = "\t\tDette er nogle få ord :) ... ";
$trimmed = rtrim($tekst);
// $trimmed = "\t\tDette er nogle få ord :) ..."
$trimmed = rtrim($tekst, " \t.");
// $trimmed = "\t\tDette er nogle få ord :)"
$ren = rtrim($binary, "\0x00..\0x1F");
// Fjern ASCII kontroltegn fra enden af $binary
// (fra 0 til og med 31)
?>
]]>
</programlisting>
</para>
</example>
<para>
Se også <function>trim</function> og <function>ltrim</function>.
</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
-->