Bookmark this: tool.io/text/concatenate-two-strings/source-code
Concatenate Two Strings Source Code
Browse the implementation files for Concatenate Two Strings.tool.ts typescript
// Tool: Concatenate Two Strings
import { concatenateTwoStrings as concatenatePortableStrings } from '@tool.io/tools/text/concatenate-two-strings';
export const concatenateTwoStrings = (
firstInput: unknown,
secondInput: unknown,
): string => {
if (typeof firstInput !== 'string' || typeof secondInput !== 'string') {
return '';
}
return concatenatePortableStrings(firstInput, secondInput);
};
export const Tool: TypeTool = {
name: 'Concatenate Two Strings',
slug: 'text/concatenate-two-strings',
intro: 'Join two strings without adding a separator.',
tool: concatenateTwoStrings,
i: [
{
example: 'tool',
label: 'First String',
placeholder: 'Enter the first string',
type: 'text',
},
{
example: '.io',
label: 'Second String',
placeholder: 'Enter the second string',
type: 'text',
},
],
o: [
{
example: 'tool.io',
label: 'Combined String',
placeholder: 'Combined string will appear here...',
type: 'text',
},
],
};
export default Tool;
Description
Browse the implementation files for Concatenate Two Strings.