Function StringFormat
(ByVal str As String, ParamArray arr_replace_with
() As Variant
)
Dim item
As Variant
Dim n
As Long, n_source
As String
Dim result
As String
result
= str
For Each item
In arr_replace_with
n_source
= "{
" & n & "}"
result
= Replace
(result
, n_source
, item
)
n
= n
+ 1
Next
StringFormat
= result
End Function
转载请注明原文地址: https://lol.8miu.com/read-429.html