cvs: phpdoc-nl /reference/filesystem/functions fnmatch.xml
[email protected] ("Patric Stout")
| Newsgroups | php.doc.nl |
|---|---|
| Message-ID | <cvstruelight1041621382@cvsserver> |
truelight Fri Jan 3 14:16:22 2003 EDT
Added files:
/phpdoc-nl/reference/filesystem/functions fnmatch.xml
Log:
Sync with EN
Index: phpdoc-nl/reference/filesystem/functions/fnmatch.xml
+++ phpdoc-nl/reference/filesystem/functions/fnmatch.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- EN-Revision: 1.1 Maintainer: truelight Status: ready -->
<refentry id="function.fnmatch">
<refnamediv>
<refname>fnmatch</refname>
<refpurpose>Controleert het bestandsnaam op een patroon</refpurpose>
</refnamediv>
<refsect1>
<title>Beschrijving</title>
<methodsynopsis>
<type>array</type><methodname>fnmatch</methodname>
<methodparam><type>string</type><parameter>pattern</parameter></methodparam>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
</methodsynopsis>
<para>
<function>fnmatch</function> controleert of de gegeven <parameter>string</parameter>
overeenkomt met de opgegeven shell-wildcard <parameter>pattern</parameter>.
</para>
<para>
Dit is bijzonder gemakkelijk voor bestandsnamen, maar kan ook gebruikt worden
voor normale strings. De gemiddelde gebruiker is gewend aan shell-patronen of in ieder
geval in zijn simpelste vorm, zoals <literal>'?'</literal> en <literal>'*'</literal>
wildcards. Dus door <function>fnmatch</function> te gebruiken ipv <function>ereg</function>
of <function>preg_match</function> zal gemakkelijker zijn voor niet-programeerende gebruikers.
</para>
<example>
<title>
Controleert een kleurnaam op een shell-wildcard patroon.
</title>
<programlisting role="php">
<![CDATA[
if(fnmatch("*gr[ae]y", $color)) {
echo "een soort van 'gray'...";
}
]]>
</programlisting>
</example>
<para>
Zie ook <function>glob</function>,
<function>ereg</function>,
<function>preg_match</function>
en de unix handleiding onder <literal>fnmatch(3)</literal> voor vlag namen
(zolang ze hier niet gedocumenteerd zijn <!-- TODO hartmut -->).
</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
-->