请输入您要查询的百科知识:

 

词条 strrev
释义

原型:extern char *strrev(char *s);

用法:#include <string.h>

功能:把字符串s的所有字符的顺序颠倒过来(不包括空字符NULL)。

说明:返回指向颠倒顺序后的字符串指针。

举例:

// strrev.c

#include <syslib.h>

#include <string.h>

main()

{

char *s="Welcome To Beijing";

clrscr();

textmode(0x00); // 6 lines per screen

printf("%s\%s",s,strrev(strdup(s)));

getchar();

return 0;

}

strrev(PHP 4, PHP 5)

strrev — Reverse a string

说明

string strrev ( string $string )

Returns string , reversed.

参数

string The string to be reversed.

返回值

Returns the reversed string.

范例

Example#1 Reversing a string with strrev()

strrev("Hello world!"); // outputs "!dlrow olleH"

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/2/25 5:48:03