⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basename.html

📁 unix 下的C开发手册,还用详细的例程。
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>basename</title></head><body bgcolor=white><center><font size=2>The Single UNIX &reg; Specification, Version 2<br>Copyright &copy; 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_001_269">&nbsp;</a>NAME</h4><blockquote>basename - return the last component of a pathname</blockquote><h4><a name = "tag_000_001_270">&nbsp;</a>SYNOPSIS</h4><blockquote><pre><code>#include &lt;<a href="libgen.h.html">libgen.h</a>&gt;char *basename(char *<i>path</i>);</code></pre></blockquote><h4><a name = "tag_000_001_271">&nbsp;</a>DESCRIPTION</h4><blockquote>The<i>basename()</i>function takes the pathname pointed to by<i>path</i>and returns a pointer to the final component of the pathname, deletingany trailing '/' characters.<p>If the string consists entirely of the '/' character,<i>basename()</i>returns a pointer to the string "/" .<p>If<i>path</i>is a null pointer or points to an empty string,<i>basename()</i>returns a pointer to the string "." .<p>The<i>basename()</i>function may modify the string pointed to by <i>path</i>, and may return apointer to static storage that may then be overwritten by a subsequent call to<i>basename()</i>.<p>This interface need not be reentrant.</blockquote><h4><a name = "tag_000_001_272">&nbsp;</a>RETURN VALUE</h4><blockquote>The<i>basename()</i>function returns a pointer to the final component of<i>path</i>.</blockquote><h4><a name = "tag_000_001_273">&nbsp;</a>ERRORS</h4><blockquote>No errors are defined.</blockquote><h4><a name = "tag_000_001_274">&nbsp;</a>EXAMPLES</h4><blockquote><p><table  bordercolor=#000000 border=1 align=center><tr valign=top><th align=center><b>Input String</b><th align=center><b>Output String</b><tr valign=top><td align=left>"/usr/lib"<td align=left>"lib"<tr valign=top><td align=left>"/usr/"<td align=left>"usr"<tr valign=top><td align=left>"/"<td align=left>"/"</table></blockquote><h4><a name = "tag_000_001_275">&nbsp;</a>APPLICATION USAGE</h4><blockquote>None.</blockquote><h4><a name = "tag_000_001_276">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_001_277">&nbsp;</a>SEE ALSO</h4><blockquote><i><a href="dirname.html">dirname()</a></i>,<i><a href="libgen.h.html">&lt;libgen.h&gt;</a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX &reg; is a registered Trademark of The Open Group.<br>Copyright &copy; 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -