LD String1
REPLACE_INT String2, Length_Str, Position
ST Result_String
Result_String:= REPLACE_INT(String1, String2, Length_Str, Position);
Paramètre
|
Type
|
Commentaire
|
---|---|---|
String1
|
Chaîne de caractères originale dans laquelle est insérée une sous-chaîne de caractères à partir de Position sur la longueur Length_Str.
Exemple : String1 contient "SWITCH TO RUN"
Remarque : Length_Str est la longueur du texte à remplacer et non celle de la chaîne String2. En effet, la chaîne de remplacement peut avoir une longueur différente de la chaîne remplacée.
|
|
String2
|
Chaîne de caractères à insérer dans String1 pour remplacer les caractères existants.
Exemple : String2 contient "STOP"
|
|
Length_Str
|
Nombre de caractères à remplacer dans String1 par String2
Exemple : Length_Str =3
|
|
Position
|
Rang du premier caractère de la sous-chaîne à remplacer
Exemple : Position =11
|
Paramètre
|
Type
|
Commentaire
|
---|---|---|
Result_String
|
La chaîne String2 a remplacé Length_Str caractères à partir du rang Position de la chaîne String1 pour former Result_String.
Exemple : pour les valeurs de l'exemple fourni dans le tableau précédent, Result_String contient "SWITCH TO STOP".
|