Replace a character in a string

dealsmonkey

Active Member
Licensed User
Longtime User
Hi everyone,

i need to replace /n in string for an character but cannot figure it out !!

I have tried StrReplace, but get an error

Error description: Undeclared variable 'strreplace' is used before it was assigned any value.

I've been through all the help and docs

Any help please !!!

Neil
 

kickaha

Well-Known Member
Licensed User
Longtime User
A snippet from one of my programs
B4X:
Sub WebViewHelp_PageFinished (Url As String)
   Dim page As String
   page=url.SubString2 (22, url.Length - 5)
   page = page.Replace ("%20", " ")
   SpinnerHelp.SelectedIndex = SpinnerHelp.IndexOf (page)   
End Sub
So page is a string:
page.Replace ("%20"," ") replaces all occurences of %20 in page with a space.

Hope that helps
 
Upvote 0
Top