Skip to content

Title Capitalization, Python GUI Implementation a function that will take a title in the form of a string and return right title

Notifications You must be signed in to change notification settings

snavruzov/Title_Capitalization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

About function

There is "up style" title capitalization method where implements a function that will take a title in the form of a string and return the string with the correct capitalization for a title according to these rules:

  • Always capitalize the first word in a title.
  • Lowercase the following words, unless they are the first word of the title: ['the', 'a', 'to', 'at', 'in', 'with', 'and', 'but', 'or', 'on']
  • Uppercase any words not in the list above.

Examples

Example 1: "i loVe YoU BabY"

Would return: "I Love You Baby"

Example 2: "wHy is tHe gRaSs greEn?"

Would return: "Why Is the Grass Green?"

Note!

Before run the script you should import GUI packages.

About

Title Capitalization, Python GUI Implementation a function that will take a title in the form of a string and return right title

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages