uTools-Manuals/docs/c/strrev.html
2019-04-21 11:50:48 +08:00

37 lines
767 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1>字符串函数 - strrev</h1>
<p>原型extern char *strrev(char *s);</p>
<p>用法:#include &lt;string.h></p>
<p>功能把字符串s的所有字符的顺序颠倒过来不包括空字符NULL</p>
<p>说明:返回指向颠倒顺序后的字符串指针。</p>
举例:<pre><code class="language-c">
// strrev.c
#include &lt;syslib.h>
#include &lt;string.h>
main()
{
char *s="Welcome To Beijing";
clrscr();
textmode(0x00); // 6 lines per screen
printf("%s\n%s",s,strrev(strdup(s)));
getchar();
return 0;
}
</code></pre>相关函数:无