PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV Mobile 2024 → Replace 1x
Replace 1x
Débuté par adrianoboller, 24 nov. 2014 12:30 - Aucune réponse
Membre enregistré
3 655 messages
Popularité : +175 (223 votes)
Posté le 24 novembre 2014 - 12:30
Procedure WS_ReplaceBoller(LOCAL XML, LOCAL BUSCA, LOCAL TROCA)

TOT is int = 0
POS is int = 0

TOT = Length(XML)
LOOP (TOT)
POS+=1
IF Middle(XML,POS,Length(BUSCA)) = BUSCA
XML = Middle(XML,1,POS-1) + TROCA + Middle(XML,POS+Length(BUSCA),TOT)
BREAK
END
END

RESULT(XML)