Accueil   |   Forums   |  Offres d'emplois   |  Contact    |   Mon compte   
vendredi 22 août 2008 Rechercher :
Déposez votre CV gratuitement sur touslesemplois
 
comparer les prix
» Logiciels
» Jeux vidéos
» Matériel Informatique


» ASP.NET
» ASP
» SQL
» PHP
» JAVASCRIPT
» XML
 


» ACTUALITÉ / DIVERS
» DROIT DE L'INTERNET
» INFOS VIRUS
» PATCHS MICROSOFT
» SÉCURITÉ
» BASES DE DONNÉES
» DOWNLOAD .NET
» LOGITHÈQUE
» SERVICES WEB
» Y SONT FOUS !
» .NET
» ASP
» ASP.NET
» JAVA
» PHP
» XML
» LANGAGE C#
» LANGAGE VB.NET
» UNIX / LINUX
» WINDOWS
» EVÈNEMENTS
» GASP
» MICROSOFT
 


Vous êtes ici : Forums > Langage Javascript / AJAX > Pouvez vous me commenter cette fonction

Pouvez vous me commenter cette fonction
function maFonction(texte As String, mots As String, balDeb As String,
balFin As String, mode As Integer)
if mode=0 then
mot=split(mots)
else
redim mot(0)
mot(0)=mots
end if
dim npos
dim nmot
redim npos(1)
redim nmot(1)
j=0

for i=0 to ubound(mot,1)
pos=1
do until instr(pos,lcase(texte),lcase(mot(i)))<=0
if j>ubound(npos,1) then
redim preserve npos(j)
redim preserve nmot(j)
end if
npos(j)=instr(pos,lcase(texte),lcase(mot(i)))
nmot(j)=i
pos=npos(j)+len(mot(i))
j=j+1
loop
next

if j>1 then
do until finTri
finTri=true
for i=0 to ubound(npos,1)-1
if npos(i)>npos(i+1) then
npostemp=npos(i)
npos(i)=npos(i+1)
npos(i+1)=npostemp
nmottemp=nmot(i)
nmot(i)=nmot(i+1)
nmot(i+1)=nmottemp
fintri=false
end if
next
loop
end if

for i=0 to j-1
if i=0 then deb=1 else deb=npos(i-1)+len(mot(nmot(i-1)))
maFonction = maFonction & mid(texte,deb,npos(i)-deb) & balDeb &
mid(texte,npos(i),len(mot(nmot(i)))) & balFin
next
i=i-1
If i < 0 Then
maFonction = texte
Else
If Len(texte) > npos(i) + Len(mot(nmot(i))) Then maFonction =
maFonction & Right(texte, Len(texte) - npos(i) - Len(mot(nmot(i))) + 1)
End If
end function
'

Message posté le 18/01/2004 par Yves

Répondre à ce message
 
AuteurRéponse 
fran
26/01/2004
RE : Pouvez vous me commenter cette fonction
hé dis donc, ça ressemblerai pas à un contrôle de VB ça ?
tu veux pas qu'on te fasses tes devoirs tout de même ;-) ...
Répondre


Project Hoshimi


A RETENIR CETTE SEMAINE
16/07/2008 - Windows Server 2008 : Network Access Protection
Le nouveau système d’exploitation serveur de Microsoft, Windows Server 2008, apporte avec lui de nou ...
16/07/2008 - Webcasts - Développement parallèle, à l'aube d'une nouvelle ère
Avec l'avénement des multi-coeurs, le développement parallèle devient une necéssité. Dans cette séri ...
16/07/2008 - J'en ai rien à coder - Votre devoir de vacances sur Silverlight !
Qu'est-ce que Silverlight ? Une nouvelle technologie Web permettant d'exécuter des RIA sur un large ...
16/07/2008 - Quelques petits tests sur les bases embarquées
Dans ce billet, Ayende réalise un benchmarking de plusieurs "petites" bases de données embarquées. S ...
15/07/2008 - Présentation d'ASP.NET Dynamic Data
Dynamic Data est une nouvelle technologie inclue dans l' "Asp.net 3.5 Extension CTP ". Elle fournit ...
15/07/2008 - Silverlight 2 - Les webcasts de l'événement sont en ligne
L’objectif de cette journée était de comprendre les limitations de Silverlight 1, et d’appréhender l ...
15/07/2008 - Cache transparent et Entity Framework
La gestion du cache (1er et second niveau) est une fonctionnalité très importante d'un outil de mapp ...
(c) 1999-2006 ASP MAGAZINE SARL
Partenaires : Codes sources c2i ASP-PHP
Hébergement serveurs dédiés Windows


Hit-Parade