Page 1 sur 1

@Word en Lotusscript

MessagePublié: 28 Oct 2005 à 10:42
par Cyril Niang
Salut,
Voici l'équivalent de @Word (Vu sur http://www.martinscott.com)

Code : Tout sélectionner
Function Word(thisstring As Variant, seperator As String, Byval wordno As Integer) As String
Dim place As Integer
Dim counter As Integer

Word = thisstring + seperator
While wordno > 0
place = Instr(1, word, seperator)
If place = 0 Then
wordno = 0
Else
If wordno = 1 Then
Word = Left(word, place - 1)
Else
Word = Mid$(word, place + Len(seperator), Len(word) - place)
End If
wordno = wordno - 1
End If
Wend
End Function

MessagePublié: 16 Fév 2007 à 13:56
par billbock
maintenant en V6 il existe STRTOKEN qui fait cela