---
title: "扩展Implode方法"
author: "minglelui"
date: "2010-09-09T18:01:17Z"
tags: []
categories: ["编程语言"]
slug: "implode"
draft: false
lastmod: "2010-09-09T18:01:17Z"
id: 759696
url: "https://minglelui.iteye.com/blog/759696"
---

问题描述：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