The following function generates a 22 digits string on Roku native brightscript:
function generateSessionId()
MAX_SIZE = 22
index = 0
sessionId = box("")
while index <= MAX_SIZE
index = index + 1
sessionId.appendString(Rnd(9).toStr(), 1)
end while
return sessionId
end function
On brs, it generates an empty string.
NOTE: The box()function is not available but I'm using a mock that just returns the same value passed as argument.
See Box(x as Dynamic) as Object
The following function generates a 22 digits string on Roku native brightscript:
On brs, it generates an empty string.
NOTE: The
box()
function is not available but I'm using a mock that just returns the same value passed as argument. See Box(x as Dynamic) as Object