Soyez le premier à donner votre avis sur cette source.
Snippet vu 22 688 fois - Téléchargée 35 fois
Function DelSpace(Chaine) Dim ChaineCopy, i, NbrCarToEnd, Part1, Part2 ChaineCopy = LTrim(Chaine) ChaineCopy = RTrim(ChaineCopy) i = InStr(1, ChaineCopy, " ") While i <> 0 NbrCarToEnd = Len(ChaineCopy) - (i - 1) Part1 = Mid(ChaineCopy, 1, i) Part2 = Mid(ChaineCopy, i + 2, NbrCarToEnd) ChaineCopy = Part1 & Part2 i = InStr(1, ChaineCopy, " ") Wend DelSpace = ChaineCopy End Function
Public Function DelAllSpace(Chaine)
Dim ChaineCopy, i, NbrCarToEnd, Part1, Part2
ChaineCopy = LTrim(Chaine)
ChaineCopy = RTrim(ChaineCopy)
i = InStr(1, ChaineCopy, " ")
While i <> 0
NbrCarToEnd = Len(ChaineCopy) - (i - 1)
Part1 = Mid(ChaineCopy, 1, i - 1)
Part2 = Mid(ChaineCopy, i + 1, NbrCarToEnd)
ChaineCopy = Part1 & Part2
i = InStr(1, ChaineCopy, " ")
Wend
DelAllSpace = ChaineCopy
End Function
Et voila !
Les boucles sont ce qu'il y a de plus lent! TheMit a raison.
Je t'envoie un mail avec un fichier attaché pour te montrer un truc avec les expressions régulieres.
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.