Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

...

Find entry Version 5 (Java)

Группа действий: Работа с текстом

Описание

Определяет порядковый номер символа в исходном тексте, с которого начинается вхождение искомого текста.

Image Removed

Настройки

Action group: Text

...

Description

Specifies the sequence number of the character in the source text from which the search text begins

Action icon

Image Added

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
TextText to make action on

Свойство

Описание

Тип

Пример заполнения

Обязательность заполнения поля

Параметры

Текст

Исходный текст для обработки.
Robin.String
Да

Yes

Строка поиска

Текст, для которого необходимо найти порядковый номер позиции вхождения.
Search textThe text for which it is necessary to find the ordinal position of the occurrenceRobin.String
Да

Yes

Тип вхождения

Какое вхождение будет записано в результат
Entry typeWhich entry will be written to the result.Robin.String
Нет

No

Учитывать регистр

Логическая переменная, необязательный параметр. Если значение параметра равно True, то будет учитываться регистр символов. По умолчанию False
Case SensitiveBoolean variable, optional. If the value of the variable is True, it will be case sensitive. False by default.Robin.Booleantrue
Нет
No
Результаты
Results

Результат

Числовая переменная, в которую будет записан результат поиска.
ResultNumeric variable to which the search result will be writtenRobin.Numeric

Особые условия использования

Отсутствуют.

Пример использования 

Задача: существует переменная "Первичный текст" с значением "Привет, друг! Как дела?". Требуется порядковый номер слова "Как" в тексте (первое вхождение). Вывести результат в диалоговое окно. 

Решение: воспользоваться действиями "Найти вхождение" и "Сообщение". 

Реализация: 

...



Special conditions of use

None.

Example of use

Task

There is a variable "Primary Text" with the value "Hi, friend! How are you?". The ordinal number of the word "How" in the text (first occurrence) is required. Output the result in a dialog box.

Solution

Use the "Find entry", "Show message" actions.

Implementation

  1. Create a variable with the number type, into which the result of the "Find entry" action will be written.
    Image Added
  2. Move the "Find entry" action to the workspace and set its parameters.
    Image Added
  3. Move the "Show message" action to the workspace and set its parameters.
    Image Added
  4. Click "Start" in the top panel to start the robot.

Result

The sequence number in the text for the word "How" is displayed in the dialog window.

 Image Added

Результат: 

в диалоговое окно выведен порядковый номер в тексте для слова "Как". 

 Image Removed