Skip to content

A word counting app with features for string reversal, palindrome validation, and copying to the clipboard.

Notifications You must be signed in to change notification settings

emjose/inspectext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

previous 100 days of code next

InspecText


InspecText

Table of Contents


#100DaysOfCode

Day 35: March 12, 2022

  • For job application essays, I needed a tool to keep track of word count.

  • InspecText is a word counting app, adapted from a tutorial by the Coding Artist.

  • Core features include word and character count, string reversal, substring search, and palindrome validation.

  • For enhanced functionality, the following features were implemented:

    • Keyboard navigation
    • Regex usage to handle edge cases
    • Responsiveness to mobile landscape orientation
    • Buttons for clearing text and copying to the clipboard.
  • InspecText was personally rewarding to create, as the process was a great education on the topics of validation, regular expressions, best practices, functionality, and refactoring.


Installation

1. Git clone and cd into the repo folder:

git clone git@github.com:emjose/inspectext.git && cd inspectext

2. Run the command:

open index.html

Live Site

To Mac Users:

Live Site

InspecText counts words and characters, which include emojis, whitespaces, and line breaks.

• Users can reverse strings and search for substrings in text. Search is case-insensitive.

• Each emoji will register as one word comprised of two or more characters.

• A reversed emoji may appear as �� (replacement characters) if its backwards unicode sequence is invalid.

InspecText is a progressive web app.

Click below to expand

GIF demo: Copying and clearing text

Live Site

• Users can clear text and reset the app.

• The textarea or inspection results can be copied to the clipboard.

GIF demo: Palindrome validation

Live Site

• Users can test strings for palindrome validation.

• Whitespaces, capitalization, and punctuation characters are ignored.


Invalid Palindrome Scenarios:

• Strings that only contain punctuation characters.

• Strings with emojis and/or non-alphanumeric characters.

• Alphanumeric strings that do not read the same forwards or backwards.

Palindrome Examples

Words, Names, and Dates
  • I
  • a
  • yay
  • wow
  • Otto
  • civic
  • Anna
  • tenet
  • kayak
  • rotator
  • racecar
  • Hannah
  • 2/22/22
Phrases and Sentences
  • Step on no pets!
  • Stressed desserts
  • So many dynamos.
  • Never odd or even.
  • Won't lovers revolt now?
  • Oozy rat in a sanitary zoo.
  • Murder for a jar of red rum.
  • Oh, who was it I saw? Oh, who?
  • Did Hannah see bees? Hannah did.
  • Cigar? Toss it in a can. It is so tragic.
  • Are we not drawn onward, we few, drawn onward to new era?
  • Are we not pure? “No, sir!” Panama’s moody Noriega brags. “It is garbage!” Irony dooms a man—a prisoner up to new era.

Resources


Let's Connect!

Twitter badge Linkedin badge Medium badge Instagram badge Gmail badge Portfolio badge Github badge

Back to Top

About

A word counting app with features for string reversal, palindrome validation, and copying to the clipboard.

Topics

Resources

Stars

Watchers

Forks