Lien de téléchargement direct :
zString.dllNote : le zip contient une procédure globale qui encapsule
les fonctions de la DLL (14 Ko) afin de faciliter son utilisation.
Liste des API disponibles :
// Enlève n'importe quel caractère à la droite d'une chaîne
// ----------------------------------------------------------------------------------------
// sString = chaîne à traiter
// sCharRemove = caractère(s) à enlever
// ----------------------------------------------------------------------------------------
// RETOURNE une nouvelle chaîne
// ----------------------------------------------------------------------------------------
FUNCTION Rtrim(sString is string, sCharRemove is string)
sResult is string
IF ghStringDLL THEN
sResult = ChaîneRécupère(API(StringDLL, "zRtrimAny", sString, sCharRemove), crAdresseASCIIZ)
END
RESULT sResult
// Enlève n'importe quel caractère à la gauche d'une chaîne
// ----------------------------------------------------------------------------------------
// sString = chaîne à traiter
// sCharRemove = caractère(s) à enlever
// ----------------------------------------------------------------------------------------
// RETOURNE une nouvelle chaîne
// ----------------------------------------------------------------------------------------
FUNCTION Ltrim(sString is string, sCharRemove is string)
sResult is string
IF ghStringDLL THEN
sResult = ChaîneRécupère(API(StringDLL, "zLtrimAny", sString, sCharRemove), crAdresseASCIIZ)
END
RESULT sResult
// Enlève n'importe quel caractère à gauche et à droite d'une chaîne
// ----------------------------------------------------------------------------------------
// sString = chaîne à traiter
// sCharRemove = caractère(s) à enlever
// ----------------------------------------------------------------------------------------
// RETOURNE une nouvelle chaîne
// ----------------------------------------------------------------------------------------
FUNCTION Trim(sString is string, sCharRemove is string)
sResult is string
IF ghStringDLL THEN
sResult = ChaîneRécupère(API(StringDLL, "zTrimAny", sString, sCharRemove), crAdresseASCIIZ)
END
RESULT sResult
// Compte le nombre de mots dans une chaîne
// ----------------------------------------------------------------------------------------
FUNCTION WordCount(sTxt is string)
nCount is int
IF ghStringDLL THEN nCount = API(StringDLL, "zWordCount", sTxt)
RESULT nCount
// Supprime les répétitions consécutives d'un caractère spécifique, sauf en début de chaîne
// ----------------------------------------------------------------------------------------
// sString = chaîne à traiter
// sCharToCrunch = caractère à grignoter
// ----------------------------------------------------------------------------------------
// RETOURNE une nouvelle chaîne
// --------------------------------------------------------
FUNCTION Crunch(sString is string, sCharToCrunch is string)
sResult is string
IF ghStringDLL THEN
sResult = ChaîneRécupère(API(StringDLL, "zCrunch", sString, sCharToCrunch), crAdresseASCIIZ)
END
RESULT sResult
// Converti du format HTML au format texte ASCII
// ----------------------------------------------------------------------------------------
// sString = chaîne HTLM à convertir
// ----------------------------------------------------------------------------------------
// RETOURNE une nouvelle chaîne
// --------------------------------------------------------
FUNCTION HtlmToText(sString is string)
sResult is string
IF ghStringDLL THEN
sResult = ChaîneRécupère(API(StringDLL, "zHtml2Txt", sString), crAdresseASCIIZ)
END
RESULT sResult
Cette contribution était de : http://old.wdforge.org/newbb/viewtopic.php?forum=17&topic_id=4102&post_id=16981