diff --git a/src/components/TextForm.js b/src/components/TextForm.js index 07549d6..c64dc83 100644 --- a/src/components/TextForm.js +++ b/src/components/TextForm.js @@ -13,6 +13,29 @@ export default function TextForm(props) { setText(newText) props.showAlert("Converted to lowercase!", "success"); } + + // Credits: Sachin Mittal + const handleSeClick = ()=>{ + var newText = text.toLowerCase(); + newText = newText[0].toUpperCase() + newText.slice(1); + setText(newText) + props.showAlert("Converted to Sentense case!", "success"); + } + + // Credits: Sachin Mittal + const handleCaClick = ()=>{ + var newText = text.toLowerCase(); + const arr = newText.split(" "); + + for( let i=0 ; i{ let newText = ''; @@ -49,6 +72,8 @@ export default function TextForm(props) { + +