Combine Text Component
The Combine Text component merges two text strings with customizable delimiters while maintaining formatting, handling special characters, and providing detailed combination statistics.

Combine Text workflow and architecture
Configuration Parameters
Required Parameters
- firstText: First text string to combine
- secondText: Second text string to combine
Optional Parameters
- delimiter: Text separator (default: space)
- Single character
- Multiple characters
- Special characters
- Newline
Output Format
{ "combined_text": string, "metadata": { "first_length": number, "second_length": number, "total_length": number, "delimiter_used": string, "processing_time": number }, "statistics": { "word_count": number, "character_count": number, "line_count": number, "whitespace_count": number }, "formatting": { "preserved_newlines": boolean, "trimmed_whitespace": boolean, "normalized_spaces": boolean }, "validation": { "success": boolean, "errors": Array<{ "type": string, "message": string, "position": number }>, "warnings": Array<string> } }
Features
- Custom delimiters
- Format preservation
- Whitespace handling
- Special character support
- Performance metrics
- Error handling
- Text statistics
- Validation checks
Note: Handle special characters and formatting carefully. Consider text encoding when combining strings.
Tip: Use appropriate delimiters based on content type. Implement proper whitespace handling for clean output.
Example Usage
const combiner = new TextCombiner(); // Simple space delimiter const result1 = await combiner.combine({ firstText: "Hello", secondText: "World", delimiter: " " }); // Newline delimiter const result2 = await combiner.combine({ firstText: "First paragraph", secondText: "Second paragraph", delimiter: "\n\n" }); // Custom delimiter with formatting const result3 = await combiner.combine({ firstText: "Section 1", secondText: "Section 2", delimiter: " | ", options: { preserveFormatting: true, trimWhitespace: true, normalizeSpaces: true } });
Common Delimiters:
// Space delimiter: " " // Newline delimiter: "\n" // Multiple newlines delimiter: "\n\n" // Separator delimiter: " | " // HTML delimiter: "<br>" // Custom delimiter: "---"