Модуль:String/split/doc
Материал из Википедии — свободной энциклопедии
|
Этот модуль предназначен для обработки данных, введённых через разделитель / (косая черта). Используется в шаблонах геотематики (основанных на ((Геокар)), ((Река))).
split
[править код]Принимает строку параметров через разделитель (или без него, если значение одно).
- Использование
((#invoke:String/split|split|целевая_строка|o=обёртка|r=разделитель|m=максимальное_количество|l=вывести_как_список|t=обернуть_в_шаблон|nodis=убрать_уточнение_в_ссылке))
- Примеры
((#invoke:String/split|split|Танзания/Кения/Уганда|t=Флагификация|l=1))
((#invoke:String/split|split|Кагера (область)/Мванза (область)/Мара (область)/Ньянза/Западная провинция (Кения)/Восточная область (Уганда)/Центральная область (Уганда)|o=[[%]]|r=, |nodis=1))
Кагера, Мванза, Мара, Ньянза, Западная провинция, Восточная область, Центральная область
lang
[править код]Принимает строку параметров через разделитель, возвращает список национальных названий.
- Примеры
((#invoke:String/split|lang|ru/Каспийское море/fa/دریای خزر/az/Xəzər dənizi/kk/Каспий теңізі/kum/Хазар денгиз/lez/Каспи гьуьл/tk/Hazar deňzi))
рус. Каспийское море, перс. دریای خزر, азерб. Xəzər dənizi, каз. Каспий теңізі, кум. Хазар денгиз, лезг. Каспи гьуьл, туркм. Hazar deňzi
reflang
[править код]Принимает строку параметров через разделитель, возвращает список шаблонов указаний языка (((ref-lang))).
- Примеры
((#invoke:String/split|reflang|ru/fa/az/kk/kum/lez/tk))
(рус.) (перс.) (азерб.) (каз.) (кум.) (лезг.) (туркм.)
((#invoke:String/split|reflang|ru/fa/az/kk/kum/рус./lez/tk|в))
[рус.] [перс.] [азерб.] [каз.] [кум.] (рус.) [лезг.] [туркм.]
Text is available under the CC BY-SA 4.0 license; additional terms may apply.
Images, videos and audio are available under their respective licenses.