You can find it in generalUtils.brs in the videoplayer example.
'******************************************************
'Replace substrings in a string. Return new string
'******************************************************
Function strReplace(basestr As String, oldsub As String, newsub As String) As String
newstr = ""
i = 1
while i <= Len(basestr)
x = Instr(i, basestr, oldsub)
if x = 0 then
newstr = newstr + Mid(basestr, i)
exit while
endif
if x > i then
newstr = newstr + Mid(basestr, i, x-i)
i = x
endif
newstr = newstr + newsub
i = i + Len(oldsub)
end while
return newstr
End Function
My Roku Channels:
Viddler - viddler.com
Tested Fan - tested.com | Jamie & Adam
This is my next - theverge.com
1080p Showcase - RIP
Whiskey Media - RIP
======================
http://www.binarymoustache.com