colobot-data/help/cbot/R/strmid.txt

21 lines
986 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

\b;Инструкция \c;strmid\n;
Извлекает подстроку заданной длины, начиная с выбранной позиции строчки.
Синтаксис¦:
\s;\c;strmid ( string, pos, len );\n;
\t;pos: \c;\l;int\u cbot\int;\n;
Индекс первого символа (начало считывания)
\t;len: \c;\l;int\u cbot\int;\n;
Длина извлекаемой подстроки.
Примеры¦:
\s;\c; string s = strmid("abcdef", 1, 2); // s = "bc"
\s; string s = strmid("abcdef", 4, 5); // s = "ef"
\s; string s = strmid("abcdef", 9, 2); // s = ""
\n;
\t;См. также
\c;\l;strlen\u cbot\strlen;\n;, \c;\l;strleft\u cbot\strleft;\n;, \c;\l;strright\u cbot\strright;\n;, \c;\l;strfind\u cbot\strfind;\n;, \c;\l;strval\u cbot\strval;\n;, \c;\l;strupper\u cbot\strupper;\n;, \c;\l;strlower\u cbot\strlower;\n;
\l;Программирование\u cbot;, \l;типы\u cbot\type; и \l;категории\u cbot\category;.