26 Uchar *front, *back, tmp;
28 for(front = s, back = s + len - 1; front < back; front++, back--) {
45 for(pos = 0, sreverse += len-1, sp = s; pos < len; *sreverse-- = *sp++, pos++);
60 for(pos = 0, sreverse += revLength-1; pos != len; s++, pos++){
62 for (i = 0; i < 8; i++) {
63 *sreverse-- = ((ch & 0x80) >> 7 ?
'1' :
'0');
void reverseinplace(Uchar *s, Uint len)
Reverses a string without using extra memory.
void reverseString2Binary(Uchar *s, Uint len, Uchar *sreverse, Uint revLength)
Reverses a string bit by bit and returns a new bit string with the reversed bits. ...
unsigned char Uchar
Unsigned char type.
void reversestring(Uchar *s, Uint len, Uchar *sreverse)
Reverses a string and returns the reverse in a new string.
unsigned long Uint
Unsigned int type.
static short pos
Current position in the buffer.