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: 
subhalaxmi
Visitor

Pass double quote " in String

Hello

How can I remove double quotes from my string.

For example I have a string "hello".

I want to display it as hello.How can I do it.

Can I do it like this.Or anything else.Suggest me.


str = CreateObject ("roRegex", " " ", " ").ReplaceAll (str , " ")

0 Kudos
8 REPLIES 8
EnTerr
Roku Guru

Re: Pass double quote " in String

chr(34)
0 Kudos
RokuKC
Roku Employee
Roku Employee

Re: Pass double quote " in String

"subhalaxmi" wrote:
Hello

How can I remove double quotes from my string.

For example I have a string "hello".

I want to display it as hello.How can I do it.

Can I do it like this.Or anything else.Suggest me.


str = CreateObject ("roRegex", " " ", " ").ReplaceAll (str , " ")



It can be done more simply.

Given:
s = chr(34) + "hello" + chr(34)

or equivalently:
s = """hello"""


You can do:
s = s.Replace(chr(34), "")

or equivalently:
s = s.Replace("""", "")
0 Kudos
malort
Visitor

Re: Pass double quote " in String

"RokuKC" wrote:

It can be done more simply.

Given:
s = chr(34) + "hello" + chr(34)

or equivalently:
s = """hello"""


You can do:
s = s.Replace(chr(34), "")

or equivalently:
s = s.Replace("""", "")


How safe is the second option? Are there any Roku's running firmware less than 6.2, other than classic models?

String Literals
Type String: String in quotes, e.g. "this is a string".
Note: The quotation mark character can be embedded in a string literal using two consecutive quotation marks.
E.g. s="""" : ? len(s), asc(s) outputs 1, 34.
This feature is available in firmware 6.2 or later.
0 Kudos
EnTerr
Roku Guru

Re: Pass double quote " in String

"malort" wrote:
How safe is the second option? Are there any Roku's running firmware less than 6.2, other than classic models?

That is a great question!
Given Millions of players in the wild and thousands of circumstances, it won''t be unfair to say that there is at least one functioning player with firmware 5. If we exclude outliers however,
how do we know when "practically all" (say 99.9%) of the players have reached certain firmware level or higher?
Very relevant in light of the rolling fw 7 too.
0 Kudos
RokuKC
Roku Employee
Roku Employee

Re: Pass double quote " in String

"malort" wrote:

How safe is the second option? Are there any Roku's running firmware less than 6.2, other than classic models?


All supported Roku retail products should be running firmware 6.2 or later. (This excludes legacy models running 3.x firmware).
0 Kudos
EnTerr
Roku Guru

Re: Pass double quote " in String

"RokuKC" wrote:
All supported Roku retail products should be running firmware 6.2 or later. (This excludes legacy models running 3.x firmware).

What's the way to put a numeric value to that statement, RokuKC?

Clearly, if one says 100%, they'd be lying. So you said "should". What % actually are running 6.2+ ?
That information is available in the server log files and - hopefully - also aggregated, so easy to pull. It's customary for make this available to developers, cue Apple, Android, Microsoft.
0 Kudos
RokuKC
Roku Employee
Roku Employee

Re: Pass double quote " in String

"EnTerr" wrote:
What's the way to put a numeric value to that statement, RokuKC?


Unofficially, from the numbers I've seen for Roku retail products, for non-Roku TV platforms there is nearly 99% update to 7.0 firmware.
Roku TV products are mostly on 6.2 still.
0 Kudos
EnTerr
Roku Guru

Re: Pass double quote " in String

"RokuKC" wrote:
Unofficially, from the numbers I've seen for Roku retail products, for non-Roku TV platforms there is nearly 99% update to 7.0 firmware.
Roku TV products are mostly on 6.2 still.

Thank you!
Can something meaningful be said about the connected* RokuTV too? E.g. if 99.9% (or 99, 95, 80, 67%...) are on at least 6.2?

(*) RokuTV case is interesting footnote in that one can purchase such TV set and use it as "dumb" for years w/o ever networking/activating/upgrading. But those are of no practical interest to app developers, since "no network" means "no channel installs" too. Hence "% of connected"

On a barely related note, my RokuTV got "infected" with fw 7 on 12/4 :?
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.