Cegid XRP Ultimate | I3 Actualisé le 06/10/2022 |
|||
| XLinks - ETL | |||
| Thème "Textes" | |||
| Ensemble des méthodes et macros disponibles dans le thème "Textes". |
| Macro "contains(String, String)" |
| Signature |
| if ({text}.indexOf({pattern}) > -1) { // TODO } |
| Depuis |
| 1 |
| Méthode "createString(char, int)" |
| Signature |
| String createString(char filler, int count) |
| Description |
| Crée une chaîne (String) à l'aide de la répétition du caractère (char) spécifié. Exemple : String text = xtString.createString('a', 10); report("Text : [$1]", text); // Texte : [aaaaaaaaaa] |
| Paramètres |
| char filler - Caractère à utiliser pour créer le texte. Exemple : 'C'. int count - Taille du texte à créer. Exemple 10. |
| Résultats |
| String - Texte construit par répétition du caractère spécifié. |
| Depuis |
| 1 |
| Macro "endsWith(String, String)" |
| Signature |
| if ({text}.endsWith({endPattern})) { // TODO } |
| Depuis |
| 1 |
| Méthode "isEmpty(String)" |
| Signature |
| boolean isEmpty(String text) |
| Paramètres |
| String text - Texte à tester. |
| Résultats |
| boolean - Vrai (True) si le texte est vide ou ne contient que des espaces. |
| Depuis |
| 1 |
| Méthode "isNotEmpty(String)" |
| Signature |
| boolean isNotEmpty(String text) |
| Paramètres |
| String text - Texte à tester. |
| Résultats |
| boolean - Vrai (True) si le texte n'est pas vide et contient au moins un caractère autre que le caractère espace. |
| Depuis |
| 1 |
| Macro "length(String)" |
| Signature |
| {text}.length() |
| Paramètres |
| Variable/String text - Variable (de type String) ou chaîne de caractères dont on souhaite récupérer la longueur. |
| Depuis |
| 1 |
| Méthode "lpad(String, int, char)" |
| Signature |
| String lpad(String text, int size, char chr) |
| Résultats |
| String - Texte formaté. |
| Exceptions |
| XTException - Si la taille finale est inférieure à 0. |
| Depuis |
| 1 |
| Méthode "ltrim(String)" |
| Signature |
| String ltrim(String text) |
| Description |
| Supprime les caractères "espaces" en début de texte. Exemple : L'appel xtString.ltrim(" Hello ") renvoie la chaîne "Hello ". |
| Paramètres |
| String text - Texte initial. |
| Résultats |
| String - Texte sans les espaces devant. |
| Depuis |
| 1 |
| Méthode "normalizeSpaces(String)" |
| Signature |
| String normalizeSpaces(String text) |
| Paramètres |
| String text - Texte à transformer. |
| Résultats |
| String - Texte modifié. |
| Depuis |
| 1 |
| Méthode "rpad(String, int, char)" |
| Signature |
| String rpad(String text, int size, char chr) |
| Résultats |
| String - Texte formaté. |
| Exceptions |
| XTException - Si la taille finale est inférieure à 0. |
| Depuis |
| 1 |
| Méthode "rtrim(String)" |
| Signature |
| String rtrim(String text) |
| Description |
| Supprime les caractères "espace" à la fin d'un texte. Exemple : L'appel xtString.rtrim(" trim ") renvoie la chaîne " trim" |
| Paramètres |
| String text - Texte initial. |
| Résultats |
| String - Texte sans les espaces à la fin. |
| Depuis |
| 1 |
| Macro "startsWith(String, String)" |
| Signature |
| if ({text}.startsWith({startPattern})) { // TODO } |
| Depuis |
| 1 |
| Méthode "substringUseLength(String, int, int)" |
| Signature |
| String substringUseLength(String text, int start, int length) |
| Paramètres |
| String text - Texte initial. int start - Position de départ. int length - Taille à extraire. |
| Résultats |
| String - Texte extrait. |
| Exceptions |
| XTException |
| Depuis |
| 1 |
| Macro "substring(String, int, int)" |
| Signature |
| {text}.substring({startIndex}, {endIndex}) |
| Résultats |
| String - Texte extrait. |
| Exceptions |
| IndexOutOfBoundsException - Si l'index de départ ou de fin est négatif,ou si l'index de début ou de fin est plus grand que la taille de la chaîne. |
| Depuis |
| 1 |
| Méthode "truncateRight(String, int)" |
| Signature |
| String truncateRight(String text, int size) |
| Paramètres |
| String text - Texte à traiter. int size - Taille maximale souhaitée. |
| Résultats |
| String - Texte tronqué avec la taille spécifiée. |
| Depuis |
| 1 |