This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| informatique:windows:batch [2025/12/03 13:21] – [Compresser] yahiko | informatique:windows:batch [2025/12/03 13:49] (current) – yahiko | ||
|---|---|---|---|
| Line 317: | Line 317: | ||
| * https:// | * https:// | ||
| * https:// | * https:// | ||
| + | |||
| + | ==== Supprimer des espace à la fin d'une chaîne de caractères ==== | ||
| + | <code batch> | ||
| + | SET " | ||
| + | |||
| + | CALL :RTrim Variable | ||
| + | |||
| + | ECHO Le retour de la variable : %Variable% | ||
| + | REM Va retourner "Ma super variable" | ||
| + | |||
| + | REM --- Subroutine to trim trailing spaces --- | ||
| + | :RTrim | ||
| + | SET " | ||
| + | :RTrimLoop | ||
| + | IF " | ||
| + | SET " | ||
| + | GOTO :RTrimLoop | ||
| + | ) | ||
| + | SET " | ||
| + | GOTO :EOF | ||
| + | </ | ||
| + | |||
| + | Source : | ||
| + | |||
| + | * https:// | ||