mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2026-03-10 07:53:30 +08:00
0.0.1
This commit is contained in:
36
docs/c/strrev.html
Normal file
36
docs/c/strrev.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<h1>字符串函数 - strrev</h1>
|
||||
|
||||
|
||||
<p>原型:extern char *strrev(char *s);</p>
|
||||
|
||||
<p>用法:#include <string.h></p>
|
||||
|
||||
<p>功能:把字符串s的所有字符的顺序颠倒过来(不包括空字符NULL)。</p>
|
||||
|
||||
<p>说明:返回指向颠倒顺序后的字符串指针。</p>
|
||||
|
||||
|
||||
举例:<pre>
|
||||
|
||||
|
||||
// strrev.c
|
||||
|
||||
#include <syslib.h>
|
||||
#include <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;
|
||||
}
|
||||
|
||||
</pre>相关函数:无
|
||||
|
||||
Reference in New Issue
Block a user