Remove all Occurrences of a Character in a String II
Category:
String ManipulationType:
SnippetsDifficulty:
BeginningAuthor:
Sean PageVersion Compatibility:
More information:
This may be faster than a FOR loop (see http://www.freevbcode.com/ShowCode.Asp?ID=197), especially if you're dealing with very large strings.
The iPos integer is not necessarily required, but it prevents the loop from having to calculate the INSTR three times.
Note: This function is intended for users of VB5 and below; if you have VB6, you can use the built-in replace function instead.
Instructions: Copy the declarations and code below and paste directly into your VB project.
Declarations: