HMS

Home Media Server for Roku Players
git clone https://www.brianlane.com/git/HMS
Log | Files | Refs | README | LICENSE

commit 6be73a42be453bd1fbabede5046c34889bf7796b
parent d34dca55b42e78baadcb141977e7533f134a3e36
Author: Brian C. Lane <bcl@brianlane.com>
Date:   Sun, 24 Oct 2010 17:08:23 -0700

Added a joinString function to build paths with

Diffstat:
MHMS/source/generalUtils.brs | 21+++++++++++++++++++++
1 file changed, 21 insertions(+), 0 deletions(-)

diff --git a/HMS/source/generalUtils.brs b/HMS/source/generalUtils.brs @@ -656,3 +656,24 @@ Function validateParam(param As Object, paramType As String,functionName As Stri print "invalid parameter of type "; type(param); " for "; paramType; " in function "; functionName return false End Function + +'****************************************************** +'** Join the members of a list with a string +'****************************************************** +Function joinString(list as Object, j as String, first=false, last=false) As String + if first then + str = j + else + str = "" + end if + + for each f in list + str = str + f + if last or list.Peek() <> f then + str = str + j + end if + end for + + return str +End Function +