PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Complete (Function) Left
Complete (Function) Left
Débuté par marcov, 07 mai 2024 18:33 - 3 réponses
Membre enregistré
56 messages
Posté le 07 mai 2024 - 18:33
hi,
How can I complete a string but from the left?

thanks
Membre enregistré
57 messages
Popularité : +2 (2 votes)
Posté le 10 mai 2024 - 11:38
Procedure LeftComplete(sInitialString is string, nFinalLenght is int)

RESULT Complete("",nFinalLenght-Length(sInitialString))+sInitialString
Membre enregistré
24 messages
Posté le 14 mai 2024 - 00:48
If only the Complete function had a parameter to complete on the left!
Posté le 28 mai 2024 - 18:06
Here's how it can be done using built in functions:

StringReverse(Complete(StringReverse("TEST_STRING"), 25, "A"))


This will return "AAAAAAAAAAAAA_TEST_STRING"


BR