Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 7

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 Smiley Wink
0 Kudos
1 Reply
Level 9

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: - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos