dim chaine as string
Function Remplacer(texte As String, ancien As String, nouveau As String) As String
Dim As String resultat = ""
Dim As Integer i = 1
While i <= Len(texte)
If Mid(texte, i, Len(ancien)) = ancien Then
resultat += nouveau
i += Len(ancien)
Else
resultat += Mid(texte, i, 1)
i += 1
End If
Wend
Return resultat
End Function
chaine="Le sapin dans la forêt"
chaine=Remplacer(chaine,"ê","e")
print chaine