<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>C.M. Jackson .Net &#187; function</title>
	<atom:link href="http://www.cmjackson.net/tag/function/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cmjackson.net</link>
	<description>Web Design, Programming, Tutorials</description>
	<lastBuildDate>Tue, 18 May 2010 22:43:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>String Replace Function For Lotus Script</title>
		<link>http://www.cmjackson.net/2009/01/28/string-replace-function-for-lotus-script/</link>
		<comments>http://www.cmjackson.net/2009/01/28/string-replace-function-for-lotus-script/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 21:06:29 +0000</pubDate>
		<dc:creator>Chris Jackson</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[Lotus Notes]]></category>
		<category><![CDATA[Lotus Script]]></category>
		<category><![CDATA[strreplace]]></category>

		<guid isPermaLink="false">http://www.cmjackson.net/?p=71</guid>
		<description><![CDATA[Here is a handy function that I sometimes use in my Lotus Script programs.  '=============================================================================== ' +----------------------------------------------------------------------------+ ' &#124; Function: strreplace ' +----------------------------------------------------------------------------+ ' &#124; Accepts: src, the value to search for to replace. ' &#124;          dest, the value to replace with. ' &#124;          arg, the string to search within. ' +----------------------------------------------------------------------------+ ' &#124; Description: [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a handy function that I sometimes use in my Lotus Script programs. </p>
<pre class="brush: vb;">'===============================================================================
' +----------------------------------------------------------------------------+
' | 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 &gt; 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</pre>
<p>Here is an example of how to use the function:</p>
<pre class="brush: vb;">newString = strreplace(&quot;WORLD&quot;, &quot;World&quot;, &quot;Hello WORLD!&quot;)</pre>
<p>The <em>newString</em> variable would contain &#8220;Hello World!&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cmjackson.net/2009/01/28/string-replace-function-for-lotus-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
