reference/filesystem/functions/basename.xml
88c1f8d6c9fecf352c5ce152a6f758ed013fc2c0
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.basename">
3
+
<refentry xml:id="function.basename" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>basename</refname>
6
6
<refpurpose>Returns trailing name component of path</refpurpose>
...
...
@@ -11,7 +11,7 @@
11
11
<methodsynopsis>
12
12
<type>string</type><methodname>basename</methodname>
13
13
<methodparam><type>string</type><parameter>path</parameter></methodparam>
14
-
<methodparam choice="opt"><type>string</type><parameter>suffix</parameter></methodparam>
14
+
<methodparam choice="opt"><type>string</type><parameter>suffix</parameter><initializer>""</initializer></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
17
Given a string containing the path to a file or directory, this function
...
...
@@ -29,6 +29,8 @@
29
29
<function>basename</function> is locale aware, so for it to see the
30
30
correct basename with multibyte character paths, the matching locale must
31
31
be set using the <function>setlocale</function> function.
32
+
If <parameter>path</parameter> contains characters which are invalid for the
33
+
current locale, the behavior of <function>basename</function> is undefined.
32
34
</para>
33
35
</caution>
34
36
</refsect1>
...
...
@@ -113,7 +115,6 @@ echo "6) ".basename("/");
113
115
</refsect1>
114
116

115
117
</refentry>
116
-

117
118
<!-- Keep this comment at the end of the file
118
119
Local variables:
119
120
mode: sgml
120
121