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

Problem with brightscript string concatination

when I do the following

print "pkg:/data/words"+stri(3)+".txt"

I get; words 3.txt

The result is an extra space has been added to the string between words and the number, but funny enough not between the number and .txt. Can't find out why this is happening is there any other way of concatenating strings to get around this problem?

Ta 😉
0 Kudos
1 REPLY 1
TheEndless
Channel Surfer

Re: Problem with brightscript string concatination

There is a leading padding space to allow for sign. You can either wrap it in a Trim(), or use "3.ToStr()".
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.