user:skript:structstring
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
user:skript:structstring [2010/09/21 12:59] – medwyn_cz | user:skript:structstring [2021/05/02 19:01] (current) – [Stažení] mikrom | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== StructString ====== | ====== StructString ====== | ||
- | Knihovna pro manipulaci se strukturovaným | + | Knihovna pro manipulaci se strukturovaným |
===== Autor ===== | ===== Autor ===== | ||
- | **[[http:// | + | |**[[http:// |
- | + | Pokud se Vám knihovna líbí, kliknutím na tlačítko Donate můžete přispět na její vývoj. | |
- | Spoluautor, který to sem nacpal: | + | |
- | + | // | |
- | **[[http:// | + | |
- | + | Na specifikaci požadovaných funkcí se podílel i **[[http:// | |
+ | |||
+ | ===== Automatická instalace ===== | ||
+ | ~~GEOGET_INSTALL~~ | ||
===== Popis ===== | ===== Popis ===== | ||
- | Knihovna | + | Knihovna |
+ | Pomocí knihovny můžete ukládat informace do řetězců podobným způsobem, jako byste je ukládali do databáze. S řetězci poté můžete pracovat pomocí připravených metod. | ||
- | < | + | Užití knihovny je vhodné, pokud potřebujete ukládat do tagu ke keši velké množství informací a informace dále upravovat, dotazovat se na jejich přítomnost a hodnotu a podobně. |
- | < | + | |
- | </ | + | |
+ | ==== Reprezentace řetězce uvnitř knihovny ==== | ||
+ | Knihovna se strukturovanými řetězci vnitřně pracuje jako se seznamem (TStrings). | ||
+ | Pro zajištění správné funkčnosti takovéto implementace jsou při ukládání do seznamu některé hodnoty kódovány | ||
+ | * výskyty **"** jsou zakódovány jako **& | ||
+ | * výskyty **CRLF** jsou zakódovány jako **& | ||
- | ==== Ukázka ==== | + | Ve většině případů se o toto kódování postará knihovna sama. V určitých situacích (viz dokumentace jednotlivých procedur a funkcí) |
- | FIXME Pokud je to možné a vhodné, měl by popis obsahovat i snímky obrazovek - jak vypadají ovládací dialogy skriptu, jak vypadají výstupy exportu a podobně. | + | |
- | ===== Instalace | + | === Obecný příklad |
- | Knihovna se instaluje standardním postupem jako balíček | + | Příklad strukturovaného řetězce a jeho reprezentace pomocí seznamu |
+ | * structString: | ||
+ | * structStringList: | ||
+ | |||
+ | === Konkrétní příklad | ||
+ | Příklad strukturovaného řetězce a jeho reprezentace | ||
+ | * structString: | ||
+ | * structStringList: | ||
+ | |||
+ | ==== Dostupné funkce ==== | ||
+ | === Obecné funkce === | ||
+ | <code delphi> | ||
+ | * Function returns StringList of values name1, | ||
+ | |||
+ | <code delphi> | ||
+ | * Function decodes string from structString code | ||
+ | |||
+ | <code delphi> | ||
+ | * Function encodes string into structString code | ||
+ | |||
+ | === Nastavování hodnot === | ||
+ | <code delphi> | ||
+ | * Function sets values of given name in the given structStringList. If overwrite is true, all other values of given name will be deleted before | ||
+ | |||
+ | <code delphi> | ||
+ | * Function sets value of given name in the given structStringList. If overwrite is true, all other values of given name will be deleted before | ||
+ | |||
+ | <code delphi> | ||
+ | * Function sets values of given name in the given structString. If overwrite is true, all other values of given name will be deleted before | ||
+ | |||
+ | <code delphi> | ||
+ | * Function sets value of given name in the given structString. If overwrite is true, all other values of given name will be deleted before | ||
+ | |||
+ | === Test obsahu === | ||
+ | <code delphi> | ||
+ | * Does the structString contain the given value? If regex is true, value parameter is handled as regular expression | ||
+ | |||
+ | <code delphi> | ||
+ | * Does the structString contain value of the given name? | ||
+ | |||
+ | <code delphi> | ||
+ | * Does the structStringList contain the given value? If regex is true, value parameter is handled as regular expression | ||
+ | |||
+ | <code delphi> | ||
+ | * Does the structStringList contain value of the given name? | ||
+ | |||
+ | === Získání uložených hodnot === | ||
+ | <code delphi> | ||
+ | * Function returns StringList of all values of given name in given structString. Values must be decoded using StructStringDecode before use | ||
+ | |||
+ | <code delphi> | ||
+ | * Function returns structString of values from structStringList | ||
+ | |||
+ | <code delphi> | ||
+ | * Function returns value of first occurence of value of given name in given structString | ||
+ | |||
+ | <code delphi> | ||
+ | * Function returns StringList of all values of given name in given structStringList. Values must be decoded using StructStringDecode before use | ||
+ | |||
+ | <code delphi> | ||
+ | * Function returns value of first occurence of value of given name in given structStringList | ||
+ | |||
+ | === Mazání hodnot === | ||
+ | <code delphi> | ||
+ | * Function deletes all values of given name in given structString | ||
+ | |||
+ | <code delphi> | ||
+ | * Function deletes all values of given name and value in given structString | ||
+ | |||
+ | <code delphi> | ||
+ | * Function deletes all values of given name in given structStringList | ||
+ | |||
+ | <code delphi> | ||
+ | * Function deletes all values of given name and value in given structStringList | ||
+ | |||
+ | ===== Seznam skriptů, které používají tuto knihovnu ===== | ||
+ | {{topic> | ||
+ | |||
+ | Pokud jste narazili na skript, který knihovnu používá, ale není zde uveden, kontaktujte, | ||
===== Stažení ===== | ===== Stažení ===== | ||
- | <box round 95% #DEE7EC> | + | <WRAP round download> |
- | :!: Stáhnout aktuální verzi: ~~DOWNLOAD structstring-*.gip highest~~ | + | Stáhnout aktuální verzi: ~~DOWNLOAD structstring-*.gip highest~~ |
- | </box> | + | </WRAP> |
==== Seznam dostupných verzí ==== | ==== Seznam dostupných verzí ==== | ||
- | {{filelist> | + | {{filelist> |
- | ==== Changelog | + | ===== Seznam změn ===== |
- | === 1.0 (2010/09/07 23:00) === | + | === 1.1.1 (2010/01/23 16:00) === |
- | | + | |
- | === 1.1 (2010/09/07 23:00) === | + | |
- | | + | |
- | <hidden onHidden=":!: **Zobrazit změny ve starších verzích**" | + | === 1.1 (2010/10/04 12:00) === |
- | === 0.9 (Datum) === | + | |
- | | + | |
- | </hidden> | + | === 1.0 (2010/09/07 23:00) === |
+ | * Úvodní verze | ||
- | {{tag> | + | {{tag>author_medwyn |
user/skript/structstring.1285066776.txt.gz · Last modified: 2010/09/21 00:00 (external edit)