Query: strrev
OS: debian
Section: 3pub
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
STRREV(3pub) C Programmer's Manual STRREV(3pub)NAMEstrrev - reverse a string in placeSYNOPSIS#include <publib.h> char *strrev(char *str);DESCRIPTIONstrrev reverses the argument string in place, i.e., it swaps the ith character from the beginning with the ith character from the end.RETURN VALUEstrrev returns its argument.EXAMPLEReversing "dlrow, elloh" would be done like the following. char str[] = "dlrow, elloh"; puts(strrev(str)); This would output "hello, world". Note that using the string literal as the argument would be an error, since it is not allowable to mod- ify string literals.BUGSDoes not automatically detect palindromes, nor automatically return without doing anything.SEE ALSOpublib(3), memrev(3)AUTHORLars Wirzenius (lars.wirzenius@helsinki.fi) Publib C Programmer's Manual STRREV(3pub)
Related Man Pages |
---|
xfree(3pub) - debian |
memshuffle(3pub) - debian |
strltrim(3pub) - debian |
xmalloc(3pub) - debian |
xmemdup(3pub) - debian |
Similar Topics in the Unix Linux Community |
---|
malloc vs realloc |
segfault in pointer to string program |
String pointer does not work |