Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jbrave
Channel Surfer

no replace substring function?

I'm guessing either I'm missing something, or I need to somehow cook this up from scratch? Just want to replace spaces in a query with "+" or ","

- Joel
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
3 REPLIES 3
jbrave
Channel Surfer

Re: no replace substring function?

Ah, I see, roRegex, huh? This should be in the String functions section maybe insted of it's own section?
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
Fortyseven
Visitor

Re: no replace substring function?

"jbrave" wrote:
Ah, I see, roRegex, huh? This should be in the String functions section maybe insted of it's own section?


Yeah; I was in the middle of writing my own str_replace() function when I hit across that. I was stunned that such a basic tool was absent. Quite happy to find I was wrong. 😉
0 Kudos
TheEndless
Channel Surfer

Re: no replace substring function?

For querystring replacements, you can use the Escape/Unescape methods of the roUrlTransfer object:

Function UrlEncode( query As String ) As String
http = CreateObject( "roUrlTransfer" )
Return http.Escape( query )
End Function

Function UrlDecode( query As String ) As String
http = CreateObject( "roUrlTransfer" )
Return http.Unescape( query )
End Function
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.