Web Design, Programming, Tutorials
Archive for January, 2009
String Replace Function For Lotus Script
Jan 28th
Here is a handy function that I sometimes use in my Lotus Script programs.
'=============================================================================== ' +----------------------------------------------------------------------------+ ' | Function: strreplace ' +----------------------------------------------------------------------------+ ' | Accepts: src, the value to search for to replace. ' | dest, the value to replace with. ' | arg, the string to search within. ' +----------------------------------------------------------------------------+ ' | Description: ' | Replaces all occurances of src with dest in the string arg. ' +----------------------------------------------------------------------------+ '=============================================================================== Public Function strreplace(Byval src As String, Byval dest As String, Byval arg As String) As String 'Declare variables Dim pos As Integer 'Initialize pos = Instr(arg, src) 'Loop through the string While (pos > 0) arg = Left(arg, pos - 1) + dest + Mid(arg, pos + Len(src)) pos = Instr(pos + Len(dest), arg, src) Wend 'Return the replaced string strreplace = arg End Function
Here is an example of how to use the function:
newString = strreplace("WORLD", "World", "Hello WORLD!")
The newString variable would contain “Hello World!”
New Years Resolutions
Jan 14th
Here are a few things I’m going to try and work on for this year:
- Use this website more
- Finish some old projects
- Work on writing more
- Lose weight
- Read more books
The Good Old Games
Jan 13th
Today my brother visited me at work and we went out to lunch. He brought me a spare copy of the Legend Of Zelda collection for the GameCube.
I’d recently purchased a Nintendo Wii and was excited to learn that you can play older GameCube games as well as download games over the Internet. Nintendo’s games may not have the best graphics, but I am impressed at how they tend to offer some way to run their legacy games, with some even going all the way back to the original Nintendo Entertainment System.
I spent some time this evening tweaking the template to fix a few items. I think the site is finally ready to start adding more content.
New Year, New Theme!
Jan 12th
Well, it’s a new year and I thought I’d put a fresh new theme on the website. As a New Year’s resolution, I’m going to be working more on posting content here on this site. I’ve put off my projects for too long. This year I intend to start completing a few of them.