- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
LotusScript数组列表操作函数概要1
LotusScript字符串操作实例
Repeat Function
Function StringToList (thisText As String, delim As String) As Variant
** convert a string to a list, separating at the specified delimiter.
** this is often easier to use than StringToArray, since you dont have
** to worry about dimensioning your return variable
Dim templist List As String
Dim tempstring As String
Dim delimlength As Integer
Dim pos As Integer
Dim i As Integer
Find the last substring in a string
Function InstrLastEasy (startPos As Integer, fullString As String, _
searchString As String, caseSensitive As Integer) As Integer
Dim pos As Integer, lastPos As Integer
pos = Instr(startPos, fullString, searchString, caseSensitive)
Do While (pos 0)
lastPos = pos
pos = Instr(lastPos + 1, fullString, searchString, caseSensitive)
Loop
InstrLastEasy = lastPos
End Function
LotusScript version of @Left
Function StringLeft (text As String, searchTerm As String, caseSensitive As Integer)
As String
** Example: StringLeft(, ., True) would return www
** If the searchTerm isnt found, nothing is returned
Dim pos As Integer
** If there is no searchTerm, just exit
If (searchTerm = ) Then
StringLeft = text
Exit Function
End If
** try to find the searchTerm
pos = Instr(1, text, searchTerm, caseSensitive)
If (pos 0) Then
StringLeft = Left$(text, pos - 1)
Else
StringLeft =
End If
End Function
LotusScript version of @LeftBack
Function StringLeftBack (text As String, searchTerm As String, caseSensitive As
Integer) As String
** Example: StringLeftBack(, ., True) would
** return www.lotus
** If the searchTerm isnt found, nothing is returned
Dim pos As Integer
** If there is no searchTerm, just exit
If (searchTerm = ) Then
StringLeftBack = text
Exit Function
End If
** try to find the searchTerm, using the custom
** InstrLast function
pos = InstrLast(1, text, searchTerm, caseSensitive)
If (pos 0) Then
StringLeftBack = Left$(text, pos - 1)
Else
StringLeftBack =
End If
End Function
LotusScript ver
文档评论(0)