Author Topic: String replace function  (Read 1856 times)

0 Members and 1 Guest are viewing this topic.

Arch_Eric

  • Guest
String replace function
« on: May 27, 2008, 12:18:50 PM »
I can't remember if it was here or the other place, but I remember somebody posting a string replace function that worked like:
Code: [Select]
(strrep "This %%1 will have %%2 new %%3 in it." "string" 3 "words")
And would produce "This string will have 3 new words in it." I was going to make one of my own, but didn't know how to handle a variable number of...variables. I guess I could make the new strings into a list when calling the func.

daron

  • Guest
Re: String replace function
« Reply #1 on: May 27, 2008, 12:36:56 PM »
You could start here.

Arch_Eric

  • Guest
Re: String replace function
« Reply #2 on: May 27, 2008, 12:51:05 PM »
Thanks.  I knew I had seen it, was just searching for the wrong thing.  :ugly: