Visit SearchWinDevelopment.com, the Visual Basic-Specific Search Engine.
               FREE benefits include Daily News, Developer Tips, Career Center, VB Forums & more.


Home Recent Code Popular Code SearchWinDevelopment.com White Papers

Jobs

Submit Code Email


Author:  Eric A. Johnson
Date Submitted:  2/4/2006
Category:  String Handling/Manipulation
Compatibility:  .NET
This code has been accessed 2847 times.

Email Yourself this snippet:

Task: This function can be used to swap any two characters within a string. It returns the original string if the positions to swap are identical, and if one of the positions is out-of-bounds, it returns an empty string. Don't forget to start the positions from 0 for the first character! :)
Declarations

Code