From 3f50598ff135d7c88dea8dd3bdbf7f59a8ca877a Mon Sep 17 00:00:00 2001 From: Isabella Hochschild <40366749+isabellahoch@users.noreply.github.com> Date: Sat, 16 Nov 2024 16:41:55 -0500 Subject: [PATCH] newline --- src/stringUtils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stringUtils.ts b/src/stringUtils.ts index 7dcb158..0188f25 100644 --- a/src/stringUtils.ts +++ b/src/stringUtils.ts @@ -3,6 +3,7 @@ export function isEmptyString(str: string): boolean { return str.trim() === ''; } + // Function to check if a string is a palindrome export function isPalindrome(str: string): boolean { const reversedStr = str.split('').reverse().join(''); @@ -27,4 +28,4 @@ export function truncateString(str: string, maxLength: number): string { // Function to capitalize the first letter of each word in a string export function capitalizeWords(str: string): string { return str.split(' ').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' '); -} \ No newline at end of file +}