ITeye博客

扩展Implode方法

minglelui · 2010-09-09 18:01 · Lotus · 编程语言 · Markdown

问题描述:Lotuscript中提供的Implode对整数数组进行处理的时候,报错提示“对象不匹配”。 解决办法: Implode对字符串数组进行处理 Function ExtImplode(valueToImplode,Seperator As String) As String '=== Returns the value of the list or array imploded into a single string using separator

'--- If not array or list then quit If Not Isarray( valueToImplode ) And Not Islist( valueToImplode ) Then Exit Function

retVal = ""

'--- Loop through value to implode Forall aVal In valueToImplode

	If hitOne Then

'--- Append seperator and value to return value retVal = retVal & Seperator & aVal Else '--- Set inital value of return value to first value retVal = aVal hitOne = True End If End Forall

ExtImplode = retVal

End Function

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。