Subj : Re: strrev oddity To : borland.public.cpp.borlandcpp From : Georges Date : Tue Jan 06 2004 05:02 pm "Ed Mulroy [TeamB]" wrote: > There is no bug. The function is supposed to reverse the order of the > characters in the string > > In the IDE plac the cursor on the word strrev and press ^F1 to get help on > the function. You will see something like this: > > ------------------- > Reverses a string. > strrev changes all characters in a string to reverse order, > except the terminating null character. (For example, it > would change string\0 to gnirts\0.) > > Return Value > strrev returns a pointer to the reversed string. > ------------------- > > . Ed > > > Georges wrote in message > > news:3FFAD8C3.A7B9B906@radiolink.net... > > > > strrev does something most odd! (5.02) > > > > reversing a string with brackets changes the bracket > > symbol so for example > > > > strrev(" [12345] "); produces ]54321[ > > Surely it should be [54321] !! > > > > Likewise with {} and () > > > > Is there a fix for this apparent bug ? Ed, Umm! Yes, I suppose that is strictly correct. But it looks odd! Mea Culpa! Georges .