Porovnávané verzie
Kľúč
- Tento riadok sa pridal
- Riadok je odstránený.
- Formátovanie sa zmenilo.
%GetStrItem function
| Blok kódu | ||||
|---|---|---|---|---|
| ||||
TEXT %GetStrItem( TEXT in string, INT in seq_number, TEXT in delimiter, BOOL in bTrim := @TRUE, TEXT in quoteChar := '"' ) |
| string | Text string. |
| seq_number | The sequence number of the word. |
| delimiter | Delimiter. |
| bTrim | @TRUE - The returned word will be trimmed. @FALSE - The returned word will not be trimmed. |
| quoteChar | The quote character (by default the " character). If the delimiter is inside the quotes, it is ignored. Also, if the resulting word is in quotes, they will be trimmed. %GetStrItem('A;B;"C;D";E',3,";", @FALSE) ; function returns C;D (quotes at start/end are trimmed, delimiter between quotes is ignored) |
| Blok kódu | ||||
|---|---|---|---|---|
| ||||
%GetStrItem("John;Michael;Charles;Jack;Martin",3,";") ; the function returns the value of "Charles"
%GetStrItem("John;Michael; Charles ;Jack;Martin",3,";") ; the function returns the value of "Charles"
%GetStrItem("John;Michael; Charles ;Jack;Martin",3,";", @FALSE) ; the function returns the value of " Charles " |