WDScript :: Aide en ligne pour 103 fonctions

Tier par :

Nombre de fonctions commencant par A > 4

English version

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

ExtraitChaine
En anglais : ExtractString

Version de WDScript : 2.0.5+

Extrait une sous-chaîne d'une chaîne de caractères en fonction d'un séparateur de chaîne donné.

Syntaxe

<Résultat> = ExtraitChaîne(<Chaîne initiale>, <Rang> [, <Séparateur> [, <Sens>]])

Remarque

Aucune

Exemple

<wdscript>
// Renvoie la liste des rubriques dans un tableau HTML
</wdscript>
<TABLE WIDTH=100% BORDER=1 CELLPADDING=2 CELLSPACING=1>
<TR VALIGN=TOP>
	<TH WIDTH=16%>Rubrique</TH>
	<TH WIDTH=28%>Type</TH>
	<TH WIDTH=*>Libellé</TH>
</TR>
<wdscript>
listeStr est une chaîne
retStr est une chaîne
col1 est un tableau de 10 chaînes
rang est un entier

listeStr = HListeRubrique("CLIENT", hLstDetail)
Boucle
	rang++
	retStr = ExtraitChaine(listeStr,rang,RC)
	Si retStr = EOT Alors Sortir

	col1[1] = ExtraitChaine(retStr,1)
	col1[3] = ExtraitChaine(retStr,3)
	col1[6]	= ExtraitChaine(retStr,6)
	<OUT>
	<TR VALIGN=MIDDLE>
		<TD WIDTH=16%>[%col1[1]%]</TD>
		<TD WIDTH=28%>[%col1[3]%]</TD>
		<TD WIDTH=*>[%col1[6]%]</TD>
	</TR>
	</OUT>
Fin // de Boucle

Echo ("</TABLE>")
</wdscript>

Commentaires

17/12/2014 - O'Connor Vincent [vincent dot outlook at outlook dot com]

La fonction ExtraitChaine est l\'une des fonctions que j\'utilise le plus.
Merci pour cet exemple.


Les commentaires doivent si possible être postés en anglais. Ils sont soumis à la modération avant d'être publiés.

Ajouter votre commentaire