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/23 13:23] – gord | 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 ===== | ||
+ | |**[[http:// | ||
+ | Pokud se Vám knihovna líbí, kliknutím na tlačítko Donate můžete přispět na její vývoj. | ||
+ | |||
+ | // | ||
+ | |||
+ | Na specifikaci požadovaných funkcí se podílel i **[[http:// | ||
===== Automatická instalace ===== | ===== Automatická instalace ===== | ||
~~GEOGET_INSTALL~~ | ~~GEOGET_INSTALL~~ | ||
- | ===== Autor ===== | + | ===== Popis ===== |
- | **[[http://www.geocaching.com/profile/?u=medwyn_cz|medwyn_cz]], elektronická(zavináč)adresa(tečka)cz** | + | Knihovna je určena pro vývojáře skriptů. Sama neposkytuje žádnou funkčnost pro GeoGet. |
- | + | 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. | |
- | Spoluautor, který to sem nacpal: | + | |
+ | 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 | ||
+ | * výskyty **CRLF** jsou zakódovány jako **& | ||
+ | |||
+ | 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í) je však třeba, aby zakódování/ | ||
+ | |||
+ | === Obecný příklad === | ||
+ | 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 pomocí seznamu | ||
+ | * structString: | ||
+ | * structStringList: | ||
+ | |||
+ | ==== Dostupné funkce ==== | ||
+ | === Obecné funkce === | ||
+ | <code delphi> | ||
+ | * Function returns StringList of values name1,value1, | ||
| | ||
- | **[[http:// | + | <code delphi> |
- | + | * Function decodes string from structString code | |
- | ===== Popis ===== | + | <code delphi> |
- | Knihovna poskytuje funkce pro práci se strukturovanými textovými řetězi ve tvaru | + | * Function encodes string into structString code |
- | < | + | === Nastavování hodnot === |
- | <name1=" | + | <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 | ||
- | ==== Ukázka ==== | + | <code delphi> |
- | 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ě. | + | * Function sets value of given name in the given structString. If overwrite is true, all other values of given name will be deleted before |
- | ===== Instalace | + | === Test obsahu |
- | Knihovna se instaluje standardním postupem jako balíček pomocí Správce pluginů. | + | <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.1285241004.txt.gz · Last modified: 2010/09/23 00:00 (external edit)