CAD programy 4M
(trim string [flag])
Vymaže prázdné mezery v řetězci.
Tato funkce upravuje mezery v zadaném řetězci.
Volitelný argument flag představuje možnosti pro odstranění mezery:
PŘÍKLAD:
Tato funkce upravuje mezery v zadaném řetězci.
Volitelný argument flag představuje možnosti pro odstranění mezery:
| Flag | Meaning |
|---|---|
| none | Strip all spaces from beginning and end. |
| "B" | Strip spaces from beginning of string. |
| "M" | Strip spaces from middle of string. |
| "E" | Strip spaces from end of string. |
| "BE" | Strip spaces from beginning and end of string. |
| "ME" | Strip spaces from middle and end of string. |
| "BM" | Strip spaces from beginning and middle of string. |
PŘÍKLAD:
| Kód | Vrací |
|---|---|
| (setq a " Green Beans " ) | |
| (trim a "B" ) | "Green Beans " |
| (trim a "M" ) | " GreenBeans " |
| (trim a "be") | "Green Beans" |
| (trim a) | "Green Beans" |