Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!uunet!indetech!jack!jtanner From: jtanner@jack.sns.com (Jason Tanner) Newsgroups: comp.lang.c Subject: How do you swap strings? Message-ID: <1991Jun1.203738.28387@jack.sns.com> Date: 1 Jun 91 20:37:38 GMT Sender: jtanner@jack.sns.com (Jason Tanner) Distribution: na Organization: Systems'n'Software Lines: 18 Is there a command to swap to elements in an array? Currently I am using strcpy and a temporary string to swap around the 2 elements and this dosnt seem to work very well.. Swapping strings is such an important command I cant believe that it dosnt exist.. now I am using something like this.. strcpy(temp,destination); strcpy(destination,source); strcpy(source,temp); there must be something better.. -- |----------------------------------------------------------------------------| | jtanner@jack.sns.com - - Coke IS it! - - Knowledge = Power!! | | This space was intentionally left filled. | |------------------------------Dare to think!--------------------------------|