G
Guest
I've been wrestling with this programming problem for some time now, so I
thought I'd put it up for discussion. I'm trying to design a Mask function.
See if you can figure out a code for it...
The best way to explain this is to give an example of what the functions
should do.
* Let us a define a function as follows:
Public Function Mask(ByRef inputStr As String, ByRef maskInStr As
String, ByRef maskOutStr As String, ByVal delimiter As Char) As String
* Put in the following values:
inputStr = "The quick brown fox % jumped over the dog."
maskInStr = "The quick %1 fox %% jumped over the %2."
maskOutStr = "Yo %% momma's %1 beaver smells like %2."
* The function should return:
Mask = "Yo % momma's brown beaver smells like dog."
From this you should be able to figure out how the function should work.
Please, only post solutions that WORK. Good luck!
thought I'd put it up for discussion. I'm trying to design a Mask function.
See if you can figure out a code for it...
The best way to explain this is to give an example of what the functions
should do.
* Let us a define a function as follows:
Public Function Mask(ByRef inputStr As String, ByRef maskInStr As
String, ByRef maskOutStr As String, ByVal delimiter As Char) As String
* Put in the following values:
inputStr = "The quick brown fox % jumped over the dog."
maskInStr = "The quick %1 fox %% jumped over the %2."
maskOutStr = "Yo %% momma's %1 beaver smells like %2."
* The function should return:
Mask = "Yo % momma's brown beaver smells like dog."
From this you should be able to figure out how the function should work.
Please, only post solutions that WORK. Good luck!