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

Ключ

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

...

Check text for null and void Version 6 (Java)

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

Описание

Action group: Text

...

Description

Checks if the text is empty or equal to Проверяет является ли текст пустым или равен "null"

Иконка

Image Removed

Параметры

Входные параметры  

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

Выходные параметры

Результат Логическая переменная, в которую будет записан результат проверки.

Настройки

...

Свойство

...

Англ. наименование

...

Описание

...

Тип

...

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

...

Логическая переменная, в которую будет записан результат проверки.

...

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

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

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

Задача

Существует переменная "Вводный текст" с текстом "Hallo!". Требуется проверить текст в переменной на null и пустоту, результат записать в логическую переменную и вывести сообщение: текст пуст или текст имеется. 

Решение

Воспользоваться действиями "Проверить на null и пустоту", "Если", "Сообщение". 

Реализация

...

Action icon

Image Added

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
TextSource text for processing.Robin.String
Yes
Spaces as emptiness
Robin.BooleantrueNo
Results
ResultBoolean variable to which the test result will be writtenRobin.Booleantrue

Special conditions of use

None.

Example of use

Task

There is a variable "Input text" with the text "Hallo!". It is required to check the text in the variable for null and empty, write the result to a boolean variable and print a message: text is empty or text is present. 

Solution

Use the actions "Check for null and void", "If", "Show message". 

Implementation

  1. Create a boolean variable to which the result of the "Check for null and void" action will be written. 
    Image Added

  2. Move the "Check for null and void" action to the workspace and set its parameters. 
    Image Added

  3. Move the "If" action to the workspace and set its parameter. 
    Image Added

  4. Add a "Show message" action to the "Truth" branch and set its parameter. 
    Image Added

  5. In the "False" branch, add a "Show message" action and set its parameter. 
    Image Added

  6. Launch the robot using the "Start" button in the top panel. 

Result

The text is found and the result is displayed in the dialog box 

Результат

Текст найден, результат отображен в диалоговом окне