Forum Discussion
TheEndless
15 years agoRoku Guru
Funny... When I posted it, I said to myself, "I should probably put comments in here", but I'm far too lazy for that... 😉
There was a thread awhile back about the differences between the standalone versions of InStr and the instance versions (I think it's the same for Mid as well). If I had to guess, I'd say Roku went that route for familiarity for developers. For example, in VBScript InStr() is 1 based, whereas in VB.Net the .InStr() method is 0 based, so, if you're used to using VBScript, a 0 based InStr standalone function might confuse you, and vice versa if you used to using .Net. Total speculation, but it seems like a reasonable explanation to me...
There was a thread awhile back about the differences between the standalone versions of InStr and the instance versions (I think it's the same for Mid as well). If I had to guess, I'd say Roku went that route for familiarity for developers. For example, in VBScript InStr() is 1 based, whereas in VB.Net the .InStr() method is 0 based, so, if you're used to using VBScript, a 0 based InStr standalone function might confuse you, and vice versa if you used to using .Net. Total speculation, but it seems like a reasonable explanation to me...