ComfyUI Node
AGSoft Text Operation
A node for applying common text transformations. Choose from a list of predefined operations like uppercase, lowercase, etc. The 'count_words' operation outputs the word count to the 'count' socket. The 'split_lines' operation outputs the joined lines to the 'lines' socket as a single string separated by newlines. Нода для применения распространенных текстовых преобразований. Выберите одну из предопределенных операций, таких как верхний регистр, нижний регистр и т.д. Операция 'count_words' выводит количество слов в сокет 'count'. Операция 'split_lines' выводит объединенные строки в сокет 'lines' как одну строку, разделенную символами новой строки.
AGSoft Text Operation
- text
- count
- lines
◄text—►
◄operationuppercase►
CategoryAGSoft/Text
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | The text to apply the operation to. This is the source string that will be modified. Текст, к которому будет применена операция. Это исходная строка, которая будет изменена. | |
| operation | COMBO | uppercase | Select the operation to perform on the input text. Выберите операцию, которую нужно выполнить над входным текстом. - uppercase: Converts all characters to uppercase. Преобразует все символы в верхний регистр. - lowercase: Converts all characters to lowercase. Преобразует все символы в нижний регистр. - capitalize: Capitalizes the first letter of the entire string. Делает первую букву всей строки заглавной. - invert_case: Inverts the case of each character (upper becomes lower and vice versa). Инвертирует регистр каждого символа (верхний становится нижним и наоборот). - reverse: Reverses the order of characters in the string. Переворачивает порядок символов в строке. - trim: Removes leading and trailing whitespace (spaces, tabs, newlines) from the string. Удаляет начальные и конечные пробельные символы (пробелы, табуляции, переводы строк) из строки. - remove_spaces: Removes ALL whitespace characters (spaces, tabs, newlines) from the string. Удаляет ВСЕ пробельные символы (пробелы, табуляции, переводы строк) из строки. - count_words: Counts the number of words in the text. The result is output to the 'count' socket. Подсчитывает количество слов в тексте. Результат выводится в сокет 'count'. - split_lines: Splits the text into lines and outputs them as a single string joined by newlines. Useful for processing multi-line text. Разбивает текст на строки и выводит их как одну строку, соединенную символами новой строки. Полезно для обработки многострочного текста. - join_lines: Joins all lines of the text into a single line, separated by a space. Useful for flattening multi-line text. Объединяет все строки текста в одну строку, разделенные пробелом. Полезно для сглаживания многострочного текста. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| count | INT | — |
| lines | STRING | — |